about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2023-11-19 23:17:27 +0100
committerUrgau <urgau@numericable.fr>2023-11-21 19:06:58 +0100
commit54c122ec0d45799e795f8b2aca38227ce9b05fa5 (patch)
tree96be29f29cf5a5ec39ec547cff4ec5c713c119fb
parent1c37997fa70129efea84c02cf4d863a44660ab2e (diff)
downloadrust-54c122ec0d45799e795f8b2aca38227ce9b05fa5.tar.gz
rust-54c122ec0d45799e795f8b2aca38227ce9b05fa5.zip
[Miri] Do not respect RUSTC_HOST_FLAGS since RUSTFLAGS isn't
When building the standard library with Miri, it appears that cargo-miri
does not respect the RUSTFLAGS and even if they did it would be wrong
since they are created for ToolRustc not Std. To avoid errors ignore
RUSTC_HOST_FLAGS for Miri.
-rw-r--r--src/bootstrap/src/bin/rustc.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/src/bin/rustc.rs b/src/bootstrap/src/bin/rustc.rs
index 070a2da6afb..af66cb3ffd7 100644
--- a/src/bootstrap/src/bin/rustc.rs
+++ b/src/bootstrap/src/bin/rustc.rs
@@ -114,7 +114,7 @@ fn main() {
         {
             cmd.arg("-Ztls-model=initial-exec");
         }
-    } else {
+    } else if std::env::var("MIRI").is_err() {
         // Find any host flags that were passed by bootstrap.
         // The flags are stored in a RUSTC_HOST_FLAGS variable, separated by spaces.
         if let Ok(flags) = std::env::var("RUSTC_HOST_FLAGS") {