mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
handle rustc args properly in bootstrap
Because `RUSTFLAGS` gets overwritten during the conversion from `Cargo` to `Command`, the passed rustc args were being lost. This change combines the rustc args with the values that override `RUSTFLAGS`. Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
3d5528c287
commit
199589d814
@ -2093,12 +2093,10 @@ impl<'a> Builder<'a> {
|
||||
rustdocflags.arg("--cfg=parallel_compiler");
|
||||
}
|
||||
|
||||
// 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(" "));
|
||||
}
|
||||
// Pass the value of `--rustc-args` from test command. If it's not a test command, this won't set anything.
|
||||
self.config.cmd.rustc_args().iter().for_each(|v| {
|
||||
rustflags.arg(v);
|
||||
});
|
||||
|
||||
Cargo {
|
||||
command: cargo,
|
||||
|
Loading…
Reference in New Issue
Block a user