Add panic=immediate-abort support to Cargo by saethlin · Pull Request #16041 · rust-lang/cargo (original) (raw)

I recently turned -Zbuild-std-features=panic_immediate_abort into -Cpanic=immediate-abort in rust-lang/rust#146317. There was some discussion of the feature on Zulip here: #t-compiler/major changes > Unstably add -Cpanic=immediate-abort compiler-team#909

One of the outcomes of this shipping in nightly is that a few use patterns were broken, see rust-lang/rust#146974 and rust-lang/rust#146317 for examples. I think most of the users commenting on these issues are having trouble with how RUSTFLAGS is propagated through Cargo, and most likely they would have just gotten what they wanted if they could have set a profile option instead. So I'm trying to implement that.