Unconditionally pass -wasm-enable-eh
This commit is contained in:
parent
861c7e74c8
commit
658a0a20ea
@ -99,12 +99,12 @@ fn llvm_arg_to_arg_name(full_arg: &str) -> &str {
|
||||
}
|
||||
}
|
||||
|
||||
if sess.panic_strategy() == PanicStrategy::Unwind {
|
||||
if sess.target.os == "emscripten" {
|
||||
add("-enable-emscripten-cxx-exceptions", false);
|
||||
} else if wants_wasm_eh(sess) {
|
||||
add("-wasm-enable-eh", false);
|
||||
}
|
||||
if wants_wasm_eh(sess) {
|
||||
add("-wasm-enable-eh", false);
|
||||
}
|
||||
|
||||
if sess.target.os == "emscripten" && sess.panic_strategy() == PanicStrategy::Unwind {
|
||||
add("-enable-emscripten-cxx-exceptions", false);
|
||||
}
|
||||
|
||||
// HACK(eddyb) LLVM inserts `llvm.assume` calls to preserve align attributes
|
||||
|
@ -60,12 +60,7 @@
|
||||
))] {
|
||||
#[path = "gcc.rs"]
|
||||
mod real_imp;
|
||||
} else if #[cfg(all(target_family = "wasm", panic = "unwind"))] {
|
||||
// for now, PanicStrategy::Unwind is not the default for wasm targets,
|
||||
// so we need the panic = "unwind" in the cfg above. to use llvm.wasm.throw,
|
||||
// we need to pass -wasm-enable-eh to LLVM, but that only happens if rustc
|
||||
// is compiling with -C panic=unwind. So, this lets us -Zbuild-std with
|
||||
// panic=unwind, while keeping the default panic=abort working.
|
||||
} else if #[cfg(target_family = "wasm")] {
|
||||
#[path = "wasm.rs"]
|
||||
mod real_imp;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user