From 1c0e6cf2cdd703dffab7173b8da1c0aadd29e6e6 Mon Sep 17 00:00:00 2001 From: Nikolai Nechaev Date: Thu, 30 Apr 2026 20:38:23 +0900 Subject: [PATCH] Allow exceptions on wasm platforms WASM now supports exceptions. Remove the hardcoded `-fno-exceptions` option. Resolves #1680 --- src/lib.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f2c419477..f122d3f3c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2161,15 +2161,6 @@ impl Build { cmd.push_cc_arg("-fno-plt".into()); } } - if target.arch == "wasm32" || target.arch == "wasm64" { - // WASI does not support exceptions yet. - // https://github.com/WebAssembly/exception-handling - // - // `rustc` also defaults to (currently) disable exceptions - // on all WASM targets: - // - cmd.push_cc_arg("-fno-exceptions".into()); - } if target.os == "wasi" { // Link clang sysroot