Skip to content

Commit

Permalink
Don't use stage naming in RUSTFLAGS environment variables
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Mark-Simulacrum committed Aug 19, 2019
1 parent 29a5403 commit 9b3f072
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/bootstrap/builder.rs
Expand Up @@ -859,12 +859,12 @@ impl<'a> Builder<'a> {
stage = compiler.stage;
}

let mut extra_args = env::var(&format!("RUSTFLAGS_STAGE_{}", stage)).unwrap_or_default();
let mut extra_args = String::new();
if stage != 0 {
let s = env::var("RUSTFLAGS_STAGE_NOT_0").unwrap_or_default();
if !extra_args.is_empty() {
extra_args.push_str(" ");
}
let s = env::var("RUSTFLAGS_NOT_BOOTSTRAP").unwrap_or_default();
extra_args.push_str(&s);
} else {
let s = env::var("RUSTFLAGS_BOOTSTRAP").unwrap_or_default();
extra_args.push_str(&s);
}

Expand Down

0 comments on commit 9b3f072

Please sign in to comment.