about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-07-22 19:57:36 +0200
committerGitHub <noreply@github.com>2023-07-22 19:57:36 +0200
commit3c83eabdb49b0e405927d8fbcb7ae3fa409c9d3f (patch)
tree24b9d939c8f4a4ad4565fcd1af5bf1917373345f
parent8f4b81b14631a63a024dfd0f66e9977d4c7c8487 (diff)
parentc0156f1b2c42baa7a19308f940dddab0f7d384ac (diff)
downloadrust-3c83eabdb49b0e405927d8fbcb7ae3fa409c9d3f.tar.gz
rust-3c83eabdb49b0e405927d8fbcb7ae3fa409c9d3f.zip
Rollup merge of #113948 - chenyukang:yukang-fix-113178-bootstrap, r=clubby789
Fix rustc-args passing issue in bootstrap

Fixes #113178, r? `@jyn514`
-rw-r--r--src/bootstrap/builder.rs7
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 }
     }