Skip to content

Commit 351578e

Browse files
committed
Force panic=unwind for sysroot
1 parent 61af956 commit 351578e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cargo-miri/src/phases.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,9 @@ pub fn phase_rustc(mut args: impl Iterator<Item = String>, phase: RustcPhase) {
415415
&& get_arg_flag_value("--crate-name").as_deref() == Some("panic_abort")
416416
{
417417
cmd.arg("-C").arg("panic=abort");
418+
} else {
419+
// If the user has a custom profile, this overrides it so that the sysroot is built properly.
420+
cmd.arg("-C").arg("panic=unwind");
418421
}
419422
} else {
420423
// For host crates (but not when we are just printing some info),

0 commit comments

Comments
 (0)