Open
Description
The current implementation does not support different panic strategies, and is hard-coded for unwind
. This is a tricky and difficult issue, and there will need to be some investigation and experimentation to figure out all the details. Some things to think about:
- How will cargo know which implementation to use? Somehow inspecting the profile?
- Should cargo always build both
unwind
andabort
? -C panic=abort
must be passed for thepanic_abort
crate.- Some targets default to
abort
, need to figure that out. - When building
abort
crates, cargo currently rebuilds them withunwind
when built with the libtest harness. Does this mean the entire standard library would need to be built twice? This needs more thought, as it is already subtle and finicky.
There is also some hard-coded knowledge in Cargo about building the panic-unwind/abort crates, due to the way the compiler works (just relying on the std feature flags wasn't enough). Alex mentioned a desire to remove this, but I'm not sure how.