Skip to content

Commit af77aed

Browse files
authored
Rollup merge of #63722 - Mark-Simulacrum:bootstrap-rustflags, r=alexcrichton
Don't use stage naming in RUSTFLAGS environment variables This patch supports less behavior than before, since specifiying stage 1 vs stage 2 is no longer possible, but that is presumably a somewhat rare use case anyway, so not supporting it seems acceptable (and it can be readded easily if desired). Fixes #33609
2 parents ff352cd + 9b3f072 commit af77aed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bootstrap/builder.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -859,12 +859,12 @@ impl<'a> Builder<'a> {
859859
stage = compiler.stage;
860860
}
861861

862-
let mut extra_args = env::var(&format!("RUSTFLAGS_STAGE_{}", stage)).unwrap_or_default();
862+
let mut extra_args = String::new();
863863
if stage != 0 {
864-
let s = env::var("RUSTFLAGS_STAGE_NOT_0").unwrap_or_default();
865-
if !extra_args.is_empty() {
866-
extra_args.push_str(" ");
867-
}
864+
let s = env::var("RUSTFLAGS_NOT_BOOTSTRAP").unwrap_or_default();
865+
extra_args.push_str(&s);
866+
} else {
867+
let s = env::var("RUSTFLAGS_BOOTSTRAP").unwrap_or_default();
868868
extra_args.push_str(&s);
869869
}
870870

0 commit comments

Comments
 (0)