Rollup merge of #123489 - onur-ozkan:handle-rustc-args-properly, r=clubby789
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`. Fixes #123228
This commit is contained in:
commit
b0ca3cd9d4
@ -2084,12 +2084,10 @@ impl<'a> Builder<'a> {
|
|||||||
rustdocflags.arg("--cfg=parallel_compiler");
|
rustdocflags.arg("--cfg=parallel_compiler");
|
||||||
}
|
}
|
||||||
|
|
||||||
// set rustc args passed from command line
|
// Pass the value of `--rustc-args` from test command. If it's not a test command, this won't set anything.
|
||||||
let rustc_args =
|
self.config.cmd.rustc_args().iter().for_each(|v| {
|
||||||
self.config.cmd.rustc_args().iter().map(|s| s.to_string()).collect::<Vec<_>>();
|
rustflags.arg(v);
|
||||||
if !rustc_args.is_empty() {
|
});
|
||||||
cargo.env("RUSTFLAGS", &rustc_args.join(" "));
|
|
||||||
}
|
|
||||||
|
|
||||||
Cargo {
|
Cargo {
|
||||||
command: cargo,
|
command: cargo,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user