Skip to content

Commit 3fda3ef

Browse files
committed
[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.
1 parent e1e1cb4 commit 3fda3ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/src/bin/rustc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ fn main() {
114114
{
115115
cmd.arg("-Ztls-model=initial-exec");
116116
}
117-
} else {
117+
} else if std::env::var("MIRI").is_err() {
118118
// Find any host flags that were passed by bootstrap.
119119
// The flags are stored in a RUSTC_HOST_FLAGS variable, separated by spaces.
120120
if let Ok(flags) = std::env::var("RUSTC_HOST_FLAGS") {

0 commit comments

Comments
 (0)