Skip to content

Commit a3248e1

Browse files
Make crashes dump mir to build dir
1 parent 78a7751 commit a3248e1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/tools/compiletest/src/runtest.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2560,8 +2560,15 @@ impl<'test> TestCx<'test> {
25602560
Assembly | Codegen => {
25612561
rustc.arg("-Cdebug-assertions=no");
25622562
}
2563+
Crashes => {
2564+
let mir_dump_dir = self.get_mir_dump_dir();
2565+
remove_and_create_dir_all(&mir_dump_dir);
2566+
let mut dir_opt = "-Zdump-mir-dir=".to_string();
2567+
dir_opt.push_str(mir_dump_dir.to_str().unwrap());
2568+
rustc.arg(dir_opt);
2569+
}
25632570
RunPassValgrind | Pretty | DebugInfo | Rustdoc | RustdocJson | RunMake
2564-
| CodegenUnits | JsDocTest | Crashes => {
2571+
| CodegenUnits | JsDocTest => {
25652572
// do not use JSON output
25662573
}
25672574
}

0 commit comments

Comments
 (0)