Open
Description
panic=abort
is needed in resource-constrained environments, wasm, and when building with the cranelift backend.
Building and testing std with panic=abort
today is fraught for at least two reasons:
panic=unwind
is still needed for proc macros, so setting target-specific rustflags doesn't work if you want to do this on a host platform.- Many tests (~80 by my count: 1, 2) depend on unwinding, and the test framework doesn't know how to automatically disable them. Many of these are disabled for individual platforms (wasm) or dealt with externally in a somewhat brittle way.
In order to make this work, rustbuild should support this option directly and tests relying on unwinding need to be labelled with needs-unwind
.
Given the number of tests this affects and the likelihood of regression, we may also want to test this configuration explicitly in CI. But the wasm builders would serve this purpose almost as well.