-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bootstrap: add config option for nix patching #89426
bootstrap: add config option for nix patching #89426
Conversation
Hm, I would prefer that we have this as a config.toml flag (e.g., "patch-binaries-for-nix = true/false" or so). Would that work for you? The reason to prefer an env variable is that you can set it in e.g. .bashrc or so and just get it for any rustc bootstrap, I suppose, but it feels a little icky to me to have configuration via that vector. Is there a way for us to detect that you're "wanting" to use nix that's not /etc/os-release? For example, maybe if .nix-deps exists or so we can assume we're on nix? |
a1b785b
to
98a8c1d
Compare
On NixOS systems, bootstrap will patch rustc used in bootstrapping after checking `/etc/os-release` (to confirm the current distribution is NixOS). However, when using Nix on a non-NixOS system, it can be desirable for bootstrap to patch rustc. In this commit, a `patch-binaries-for-nix` option is added to `config.toml`, which allows for user opt-in to bootstrap's Nix patching. Signed-off-by: David Wood <david.wood@huawei.com>
98a8c1d
to
e552c0d
Compare
This works for me, I’ve updated the PR with this approach. |
@bors r+ We might eventually want to make an explicit false opt-out (with the default being conditional on platform, like before this PR), but seems OK for now. We haven't heard any asks to opt out anyway. |
📌 Commit e552c0d has been approved by |
…nv-var, r=Mark-Simulacrum bootstrap: add config option for nix patching On NixOS systems, bootstrap will patch rustc used in bootstrapping after checking `/etc/os-release` (to confirm the current distribution is NixOS). However, when using Nix on a non-NixOS system, it can be desirable for bootstrap to patch rustc. In this commit, a `patch-binaries-for-nix` option is added to `config.toml`, which allows for user opt-in to bootstrap's Nix patching. r? `@Mark-Simulacrum`
…arth Rollup of 12 pull requests Successful merges: - rust-lang#87631 (os current_exe using same approach as linux to get always the full ab…) - rust-lang#88234 (rustdoc-json: Don't ignore impls for primitive types) - rust-lang#88651 (Use the 64b inner:monotonize() implementation not the 128b one for aarch64) - rust-lang#88816 (Rustdoc migrate to table so the gui can handle >2k constants) - rust-lang#89244 (refactor: VecDeques PairSlices fields to private) - rust-lang#89364 (rustdoc-json: Encode json files with UTF-8) - rust-lang#89423 (Fix ICE caused by non_exaustive_omitted_patterns struct lint) - rust-lang#89426 (bootstrap: add config option for nix patching) - rust-lang#89462 (haiku thread affinity build fix) - rust-lang#89482 (Follow the diagnostic output style guide) - rust-lang#89504 (Don't suggest replacing region with 'static in NLL) - rust-lang#89535 (fix busted JavaScript in error index generator) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
On NixOS systems, bootstrap will patch rustc used in bootstrapping after checking
/etc/os-release
(to confirm the current distribution is NixOS). However, when using Nix on a non-NixOS system, it can be desirable for bootstrap to patch rustc. In this commit, apatch-binaries-for-nix
option is added toconfig.toml
, which allows for user opt-in to bootstrap's Nix patching.r? @Mark-Simulacrum