Skip to content

Commit

Permalink
Make crashes dump mir to build dir
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed May 11, 2024
1 parent 78a7751 commit a3248e1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2560,8 +2560,15 @@ impl<'test> TestCx<'test> {
Assembly | Codegen => {
rustc.arg("-Cdebug-assertions=no");
}
Crashes => {
let mir_dump_dir = self.get_mir_dump_dir();
remove_and_create_dir_all(&mir_dump_dir);
let mut dir_opt = "-Zdump-mir-dir=".to_string();
dir_opt.push_str(mir_dump_dir.to_str().unwrap());
rustc.arg(dir_opt);
}
RunPassValgrind | Pretty | DebugInfo | Rustdoc | RustdocJson | RunMake
| CodegenUnits | JsDocTest | Crashes => {
| CodegenUnits | JsDocTest => {
// do not use JSON output
}
}
Expand Down

0 comments on commit a3248e1

Please sign in to comment.