-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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: read config from $RUST_BOOTSTRAP_CONFIG #73317
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
This should adjust x.py (well, src/bootstrap/bootstrap.py) as well and likely entirely move the detection logic to there, exclusively relying on the environment variable in the Rust code. I would also like to see the environment variable renamed to something like Other than those two, this seems fine to add to me. |
a3a2190
to
dd4bb50
Compare
These should both be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with nit fixed
This commit modifies bootstrap so that `config.toml` is read first from `RUST_BOOTSTRAP_CONFIG`, then `--config` and finally `config.toml` in the current directory. This is a subjective change, intended to improve the ergnomics when using "development shells" for rustc development (for example, using tools such as Nix) which set environment variables to ensure a reproducible environment (these development shells can then be version controlled). By optionally reading `config.toml` from an environment variable, a `config.toml` can be defined in the development shell and a path to it exposed in the `RUST_BOOTSTRAP_CONFIG` environment variable - avoiding the need to manually symlink the contents of this file to `config.toml` in the working directory. Signed-off-by: David Wood <david@davidtw.co>
dd4bb50
to
93022be
Compare
@bors r+ |
📌 Commit 93022be has been approved by |
@bors rollup |
Rollup of 10 pull requests Successful merges: - rust-lang#72280 (Fix up autoderef when reborrowing) - rust-lang#72785 (linker: MSVC supports linking static libraries as a whole archive) - rust-lang#73011 (first stage of implementing LLVM code coverage) - rust-lang#73044 (compiletest: Add directives to detect sanitizer support) - rust-lang#73054 (memory access sanity checks: abort instead of panic) - rust-lang#73136 (Change how compiler-builtins gets many CGUs) - rust-lang#73280 (Add E0763) - rust-lang#73317 (bootstrap: read config from $RUST_BOOTSTRAP_CONFIG) - rust-lang#73350 (bootstrap/install.rs: support a nonexistent `prefix` in `x.py install`) - rust-lang#73352 (Speed up bootstrap a little.) Failed merges: r? @ghost
This commit fixes a regression introduced in rust-lang#73317 where an oversight meant that `config.toml` was assumed to exist. Signed-off-by: David Wood <david@davidtw.co>
…var, r=Mark-Simulacrum bootstrap: no `config.toml` exists regression Fixes rust-lang#73574. This PR fixes a regression introduced in rust-lang#73317 where an oversight meant that `config.toml` was assumed to exist.
…var, r=Mark-Simulacrum bootstrap: no `config.toml` exists regression Fixes rust-lang#73574. This PR fixes a regression introduced in rust-lang#73317 where an oversight meant that `config.toml` was assumed to exist.
This PR modifies bootstrap so that
config.toml
is read first fromRUST_BOOTSTRAP_CONFIG
, then--config
and finallyconfig.toml
in the current directory.This is a subjective change, intended to improve the ergnomics when using "development shells" for rustc development (for example, using tools such as Nix) which set environment variables to ensure a reproducible environment (these development shells can then be version controlled, e.g. my rustc shell). By optionally reading
config.toml
from an environment variable, aconfig.toml
can be defined in the development shell and a path to it exposed in theRUST_BOOTSTRAP_CONFIG
environment variable - avoiding the need to manually symlink the contents of this file toconfig.toml
in the working directory.