From aafcf2c9422e7e1de2ebefd51d78cf1d07d02cd6 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 24 Oct 2018 11:47:17 +0200 Subject: Emit Retag statements, kill Validate statements Also "rename" -Zmir-emit-validate to -Zmir-emit-retag, which is just a boolean (yes or no). --- src/bootstrap/bin/rustc.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/bootstrap') diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index b6764c1aaea..07a05aeae5d 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -254,7 +254,12 @@ 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") { 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) -- cgit 1.4.1-3-g733a5 From 07829bc0f09a80d64487318f7e7ad44b701dac8b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 24 Oct 2018 14:08:47 +0200 Subject: don't forget to sync these flags with miri --- src/bootstrap/bin/rustc.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/bootstrap') diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 07a05aeae5d..344eb789ff6 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -253,6 +253,8 @@ 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"); // These options are preferred by miri, to be able to perform better validation, // but the bootstrap compiler might not understand them. -- cgit 1.4.1-3-g733a5