Skip to content

Commit 40334da

Browse files
committed
Auto merge of rust-lang#83565 - RalfJung:miri, r=oli-obk
update Miri, and also run test suite with mir-opt-level=4 In the Miri repo, we run the Miri test suite once with default flags and once with `-O -Zmir-opt-level=4`. This helps identify and document situations where MIR optimizations mask UB -- it is okay for that to happen, but it might be god to look into it when it does happen. Recently these tests failed fairly frequently as new MIR optimizations were added, and since we only run them on the Miri side, it is not even clear which rustc PR introduced the change. So I propose we also run these tests in the rustc repo, such that toolstate tracking will tell us the exact PR (or at least the rollup) that caused the change. r? `@oli-obk` Fixes rust-lang#83590
2 parents cc41030 + a515cfd commit 40334da

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/bootstrap/test.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,14 @@ impl Step for Miri {
452452

453453
cargo.add_rustc_lib_path(builder, compiler);
454454

455-
if !try_run(builder, &mut cargo.into()) {
455+
let mut cargo = Command::from(cargo);
456+
if !try_run(builder, &mut cargo) {
457+
return;
458+
}
459+
460+
// # Run `cargo test` with `-Zmir-opt-level=4`.
461+
cargo.env("MIRIFLAGS", "-O -Zmir-opt-level=4");
462+
if !try_run(builder, &mut cargo) {
456463
return;
457464
}
458465

0 commit comments

Comments
 (0)