Skip to content

Commit db82e40

Browse files
committed
make RUSTFLAGS take precedence over rustflags from bootstrap.toml
1 parent ddd2347 commit db82e40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bootstrap/src/core/builder/cargo.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ struct Rustflags(String, TargetSelection);
2525

2626
impl Rustflags {
2727
fn new(target: TargetSelection) -> Rustflags {
28-
let mut ret = Rustflags(String::new(), target);
29-
ret.propagate_cargo_env("RUSTFLAGS");
30-
ret
28+
Rustflags(String::new(), target)
3129
}
3230

3331
/// By default, cargo will pick up on various variables in the environment. However, bootstrap
@@ -606,6 +604,8 @@ impl Builder<'_> {
606604
rustflags.arg(arg);
607605
}
608606

607+
rustflags.propagate_cargo_env("RUSTFLAGS");
608+
609609
if build_compiler_stage != 0 {
610610
if let Ok(s) = env::var("CARGOFLAGS_NOT_BOOTSTRAP") {
611611
cargo.args(s.split_whitespace());

0 commit comments

Comments
 (0)