Skip to content

Commit

Permalink
Rollup merge of #113948 - chenyukang:yukang-fix-113178-bootstrap, r=c…
Browse files Browse the repository at this point in the history
…lubby789

Fix rustc-args passing issue in bootstrap

Fixes #113178, r? `@jyn514`
  • Loading branch information
matthiaskrgr committed Jul 22, 2023
2 parents 8f4b81b + c0156f1 commit 3c83eab
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}

Expand Down

0 comments on commit 3c83eab

Please sign in to comment.