Add a convenient way to inject rustc flags somewhere late in the bootstrap pipeline without causing rebuilds

Useful for -Ztreat-err-as-bug
This commit is contained in:
Oli Scherer 2021-09-03 14:46:26 +00:00
parent 4e1a5968f1
commit 47a6a24d51

View file

@ -147,6 +147,12 @@ fn main() {
cmd.arg("-Z").arg("force-unstable-if-unmarked");
}
if let Ok(flags) = env::var("MAGIC_EXTRA_RUSTFLAGS") {
for flag in flags.split(' ') {
cmd.arg(flag);
}
}
let is_test = args.iter().any(|a| a == "--test");
if verbose > 2 {
let rust_env_vars =