-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Implement the panic
profile option
#2687
Conversation
r? @brson |
r? @wycats (rust_highfive has picked a reviewer for you, use r? to override) |
Any chance we can get this merged sometime soon? Eagerly awaiting 😄 |
☔ The latest upstream changes (presumably #2685) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors r+ |
📌 Commit b6e0fe9 has been approved by |
⌛ Testing commit b6e0fe9 with merge aaea05d... |
💔 Test failed - cargo-linux-64 |
This is the Cargo half of the implementation of [RFC 1513] which adds a new `profile.*.panic` option to customize the `-C panic` argument to the compiler. This is not passed by default and can otherwise be specified as `abort` or `unwind` on the nightly compiler. [RFC 1513]: rust-lang/rfcs#1513 The `profile.*.panic` option is *only* used from the top-level crate, not each crate individually. This means that applications should customize this value as they see fit, and libraries will only use their own value when they're being tested. Cargo also has specific knowledge that when *testing* a crate it can't pass `-C panic=abort` for now as the default test harness requires `panic=unwind`. This essentially just means that `cargo test` will continue to work for crates that specify `panic=abort` in Cargo.toml.
@bors: r=wycats |
📌 Commit 75848a2 has been approved by |
Implement the `panic` profile option This is the Cargo half of the implementation of [RFC 1513] which adds a new `profile.*.panic` option to customize the `-C panic` argument to the compiler. This is not passed by default and can otherwise be specified as `abort` or `unwind` on the nightly compiler. [RFC 1513]: rust-lang/rfcs#1513 The `profile.*.panic` option is *only* used from the top-level crate, not each crate individually. This means that applications should customize this value as they see fit, and libraries will only use their own value when they're being tested. Cargo also has specific knowledge that when *testing* a crate it can't pass `-C panic=abort` for now as the default test harness requires `panic=unwind`. This essentially just means that `cargo test` will continue to work for crates that specify `panic=abort` in Cargo.toml.
☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64 |
Seems like there's a bug in your implementation.
I get an error if my crate depends on any crate that builds using a
|
Thanks for the report @alexbool! I unfortunately can't seem to reproduce easily, could you open an issue with some instructions about how to reproduce as well? |
@alexcrichton I didn't test a lot, but I think the issue appears when you have a different value for |
@alexcrichton the issue is #2726 :) |
Thanks! |
This is the Cargo half of the implementation of RFC 1513 which adds a new
profile.*.panic
option to customize the-C panic
argument to the compiler.This is not passed by default and can otherwise be specified as
abort
orunwind
on the nightly compiler.The
profile.*.panic
option is only used from the top-level crate, not eachcrate individually. This means that applications should customize this value as
they see fit, and libraries will only use their own value when they're being
tested.
Cargo also has specific knowledge that when testing a crate it can't pass
-C panic=abort
for now as the default test harness requirespanic=unwind
.This essentially just means that
cargo test
will continue to work for cratesthat specify
panic=abort
in Cargo.toml.