Skip to content

Commit 0fcf3dd

Browse files
committed
Unconditionally pass -wasm-enable-eh
1 parent 16e190d commit 0fcf3dd

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

panic_unwind/src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,7 @@ cfg_if::cfg_if! {
6060
))] {
6161
#[path = "gcc.rs"]
6262
mod real_imp;
63-
} else if #[cfg(all(target_family = "wasm", panic = "unwind"))] {
64-
// for now, PanicStrategy::Unwind is not the default for wasm targets,
65-
// so we need the panic = "unwind" in the cfg above. to use llvm.wasm.throw,
66-
// we need to pass -wasm-enable-eh to LLVM, but that only happens if rustc
67-
// is compiling with -C panic=unwind. So, this lets us -Zbuild-std with
68-
// panic=unwind, while keeping the default panic=abort working.
63+
} else if #[cfg(target_family = "wasm")] {
6964
#[path = "wasm.rs"]
7065
mod real_imp;
7166
} else {

0 commit comments

Comments
 (0)