[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.
This commit is contained in:
Urgau 2023-11-19 23:17:27 +01:00
parent 1c37997fa7
commit 54c122ec0d

View File

@ -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") {