granite-rust/compiler/rustc_mir_transform
Guillaume Gomez ab314a57fa
Rollup merge of #112403 - nbdd0121:eh_frame, r=Nilstrieb
Prevent `.eh_frame` from being emitted for `-C panic=abort`

Since `CheckAlignment` pass is after the `AbortUnwindingCalls` pass, the `UnwindAction::Terminate` inserted in it has no chance to be converted to `UnwindAction::Unreachable` anymore, causing us to emit landing pads that are not necessary. Although these landing pads can themselves be eliminated by LLVM, `.eh_frame` sections are still generated. This causes trouble for Rust-for-Linux project recently.

This PR changes it to generate `UnwindAction::Terminate` when we opt for `-Cpanic=unwind`, and `UnwindAction::Unreachable` for `-Cpanic=abort`.

`@ojeda`
2023-06-15 22:04:55 +02:00
..
src Rollup merge of #112403 - nbdd0121:eh_frame, r=Nilstrieb 2023-06-15 22:04:55 +02:00
Cargo.toml Migrate mir_transform to translatable diagnostics 2023-05-02 16:24:18 +01:00
messages.ftl Add note about unsafe functions body not being unsafe 2023-06-13 15:48:57 +02:00