-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support panic=abort #1549
support panic=abort #1549
Conversation
.expect("No panic runtime found!"); | ||
let panic_runtime = tcx.crate_name(*panic_runtime); | ||
// This replicates some of the logic in `inject_panic_runtime`. | ||
// FIXME: is there a way to reuse that logic? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could have a start_panic_instance
function on Session
in rustc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe we could somehow figure out "which crate that was added as a dependency is the panic runtime". I thought that's what the previous code was doing, but it still saw the panic_unwind crate even with -C panic=abort
so clearly that was not the right approach.
@bors r=oli-obk |
📌 Commit 97a71c0 has been approved by |
☀️ Test successful - checks-travis, status-appveyor |
This adds support for abort-on-panic (#1058). To achieve this, we insert
cargo-miri
asRUSTC
when building the standard library, and patch the rustc flags in a way similar to what bootstrap does.However, this is currently not supported on Windows as the Windows code uses inline assembly to cause an abort (?!?). I'll submit a rustc PR with some
cffg(miri)
to make that work. (EDIT: that would be rust-lang/rust#76871)Cc @Aaron1011 r? @oli-obk