about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorNoa <coolreader18@gmail.com>2024-02-22 16:52:48 -0600
committerNoa <coolreader18@gmail.com>2024-02-22 16:52:48 -0600
commit658a0a20eac4341e31c57cf08e019b53f09b93b4 (patch)
tree418e476370232497272af15ac0e3575fbd6d1e5e /compiler/rustc_codegen_llvm/src/llvm_util.rs
parent861c7e74c8bbc49082dcd38ef7169d99c69cd104 (diff)
downloadrust-658a0a20eac4341e31c57cf08e019b53f09b93b4.tar.gz
rust-658a0a20eac4341e31c57cf08e019b53f09b93b4.zip
Unconditionally pass -wasm-enable-eh
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm_util.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs
index e383673e1d4..51e1f408a69 100644
--- a/compiler/rustc_codegen_llvm/src/llvm_util.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs
@@ -99,12 +99,12 @@ unsafe fn configure_llvm(sess: &Session) {
             }
         }
 
-        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