We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21882aa commit e09a8bdCopy full SHA for e09a8bd
src/bootstrap/builder.rs
@@ -469,6 +469,18 @@ impl<'a> Builder<'a> {
469
stage = compiler.stage;
470
}
471
472
+ let mut extra_args = env::var(&format!("RUSTFLAGS_STAGE_{}", stage)).unwrap_or_default();
473
+ if stage != 0 {
474
+ let s = env::var("RUSTFLAGS_STAGE_NOT_0").unwrap_or_default();
475
+ extra_args.push_str(" ");
476
+ extra_args.push_str(&s);
477
+ }
478
+
479
+ if !extra_args.is_empty() {
480
+ cargo.env("RUSTFLAGS",
481
+ format!("{} {}", env::var("RUSTFLAGS").unwrap_or_default(), extra_args));
482
483
484
// Customize the compiler we're running. Specify the compiler to cargo
485
// as our shim and then pass it some various options used to configure
486
// how the actual compiler itself is called.
0 commit comments