diff options
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index b6764c1aaea..344eb789ff6 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -253,8 +253,15 @@ fn main() { // When running miri tests, we need to generate MIR for all libraries if env::var("TEST_MIRI").ok().map_or(false, |val| val == "true") { + // The flags here should be kept in sync with `add_miri_default_args` + // in miri's `src/lib.rs`. cmd.arg("-Zalways-encode-mir"); - cmd.arg("-Zmir-emit-validate=1"); + // These options are preferred by miri, to be able to perform better validation, + // but the bootstrap compiler might not understand them. + if stage != "0" { + cmd.arg("-Zmir-emit-retag"); + cmd.arg("-Zmir-opt-level=0"); + } } // Force all crates compiled by this compiler to (a) be unstable and (b) |
