Skip to content

Commit c0156f1

Browse files
committed
Fix rustc-args passing issue in bootstrap
1 parent a5e2eca commit c0156f1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/bootstrap/builder.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,13 @@ impl<'a> Builder<'a> {
20432043
rustflags.arg("-Zinline-mir");
20442044
}
20452045

2046+
// set rustc args passed from command line
2047+
let rustc_args =
2048+
self.config.cmd.rustc_args().iter().map(|s| s.to_string()).collect::<Vec<_>>();
2049+
if !rustc_args.is_empty() {
2050+
cargo.env("RUSTFLAGS", &rustc_args.join(" "));
2051+
}
2052+
20462053
Cargo { command: cargo, rustflags, rustdocflags, allow_features }
20472054
}
20482055

0 commit comments

Comments
 (0)