diff options
| author | Ben Kimock <kimockb@gmail.com> | 2025-09-21 13:04:59 -0400 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2025-09-21 13:28:01 -0400 |
| commit | aef02fb864349a249207cbd14b51b9fe5f5691ca (patch) | |
| tree | cda6492be3bdc293a876356b873e3069ea37b8d2 /compiler/rustc_session/src | |
| parent | df58fd8cf7710f7516c541769a141f0235978dab (diff) | |
| download | rust-aef02fb864349a249207cbd14b51b9fe5f5691ca.tar.gz rust-aef02fb864349a249207cbd14b51b9fe5f5691ca.zip | |
Explain tests and setting cfgs
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config/cfg.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/config/cfg.rs b/compiler/rustc_session/src/config/cfg.rs index fc36fe9d5d7..f3d91ce4a5d 100644 --- a/compiler/rustc_session/src/config/cfg.rs +++ b/compiler/rustc_session/src/config/cfg.rs @@ -205,6 +205,10 @@ pub(crate) fn default_configuration(sess: &Session) -> Cfg { ins_none!(sym::overflow_checks); } + // We insert a cfg for the name of session's panic strategy. + // Since the ImmediateAbort strategy is new, it also sets cfg(panic="abort"), so that code + // which is trying to detect whether unwinding is enabled by checking for cfg(panic="abort") + // does not need to be updated. ins_sym!(sym::panic, sess.panic_strategy().desc_symbol()); if sess.panic_strategy() == PanicStrategy::ImmediateAbort { ins_sym!(sym::panic, PanicStrategy::Abort.desc_symbol()); |
