Rollup merge of #113948 - chenyukang:yukang-fix-113178-bootstrap, r=clubby789

Fix rustc-args passing issue in bootstrap

Fixes #113178, r? `@jyn514`
This commit is contained in:
Matthias Krüger 2023-07-22 19:57:36 +02:00 committed by GitHub
commit 3c83eabdb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2043,6 +2043,13 @@ impl<'a> Builder<'a> {
rustflags.arg("-Zinline-mir");
}
// set rustc args passed from command line
let rustc_args =
self.config.cmd.rustc_args().iter().map(|s| s.to_string()).collect::<Vec<_>>();
if !rustc_args.is_empty() {
cargo.env("RUSTFLAGS", &rustc_args.join(" "));
}
Cargo { command: cargo, rustflags, rustdocflags, allow_features }
}