Skip to content

Commit

Permalink
Fix rustc-args passing issue in bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Jul 22, 2023
1 parent a5e2eca commit c0156f1
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 c0156f1

Please sign in to comment.