Skip to content

Commit

Permalink
[Miri] Do not respect RUSTC_HOST_FLAGS since RUSTFLAGS isn't
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Urgau committed Nov 20, 2023
1 parent e1e1cb4 commit 3fda3ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/src/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 3fda3ef

Please sign in to comment.