Merge pull request #499 from RalfJung/test-opt

MIR optimization level 3 works again :)
This commit is contained in:
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer 2018-10-30 09:22:59 +01:00 committed by GitHub
commit af05d1d397
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,11 +102,7 @@ fn miri_pass(sysroot: &Path, path: &str, target: &str, host: &str, need_fullmir:
flags.push(format!("--sysroot {}", sysroot.display()));
flags.push("-Dwarnings -Dunused".to_owned()); // overwrite the -Aunused in compiletest-rs
if opt {
// FIXME: Using level 1 (instead of 3) for now, as the optimizer is pretty broken
// and crashes...
// Level 0 and 1 are not the same, so this still gives us *some* coverage.
// See https://github.com/rust-lang/rust/issues/50411
flags.push("-Zmir-opt-level=1".to_owned());
flags.push("-Zmir-opt-level=3".to_owned());
} else {
flags.push("-Zmir-opt-level=0".to_owned());
// For now, only validate without optimizations. Inlining breaks validation.