diff options
| author | yukang <moorekang@gmail.com> | 2023-07-22 15:29:42 +0800 |
|---|---|---|
| committer | yukang <moorekang@gmail.com> | 2023-07-22 15:29:42 +0800 |
| commit | c0156f1b2c42baa7a19308f940dddab0f7d384ac (patch) | |
| tree | d1d92f91569b8fa29f774d5efc13dc39a7b61660 | |
| parent | a5e2eca40ec17f17b6641bcc7c069380ac395acf (diff) | |
Fix rustc-args passing issue in bootstrap
| -rw-r--r-- | src/bootstrap/builder.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 32eb4e68b08..1707dafb11a 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -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 } } |
