Skip to content

Commit 3aedb62

Browse files
Rollup merge of #163113 - durin42:llvm-24-wasm-eh, r=nikic
rustc_codegen_llvm: catch up with LLVM 24 on wasm exceptions LLVM 24 [removed](llvm/llvm-project@cf40ab1) the -wasm-enable-eh option in favor of relying on TargetMachine.Options.ExceptionModel == Wasm. We were already setting ExceptionModel to Wasm on LLVM 24 in PassWrapper.cpp for wasm targets so this is a no-op on LLVM 24. Further, we already implied the -wasm-enable-eh flag on LLVM 23, so the explicit pass in wasm-exceptions-nostd was redundant and can be safely dropped. @rustbot label: +llvm-main
2 parents 1f7530f + 9acb786 commit 3aedb62

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

‎compiler/rustc_codegen_llvm/src/llvm_util.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ unsafe fn configure_llvm(sess: &EarlySession) {
127127
}
128128
}
129129

130-
if wants_wasm_eh(&sess.target) {
130+
if get_version() < (24, 0, 0) && wants_wasm_eh(&sess.target) {
131131
add("-wasm-enable-eh", false);
132132
}
133133

‎tests/run-make/wasm-exceptions-nostd/rmake.rs‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ fn main() {
1010
.input(Path::new("src").join("lib.rs"))
1111
.target("wasm32-unknown-unknown")
1212
.panic("unwind")
13-
.arg("-Cllvm-args=-wasm-enable-eh")
1413
.arg("-Ctarget-feature=+exception-handling")
1514
.run();
1615

0 commit comments

Comments
 (0)