From b98d6da381e7e24f34932c8c7aaf370ad475a4ce Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Thu, 17 Sep 2026 18:45:25 +0000 Subject: [PATCH 1/2] [EH] Remove -wasm-enable-eh LLVM flag Previously in LLVM, we had `-mllvm -enable-emscripten-cxx-exceptions` to enable Emscriten EH, and `-mllvm -wasm-enable-eh` to enable Wasm EH. These were separate Wasm backend flags. Also there is a separate `-exception-model=` LLVM flag used for all LLVM targets. We used `wasm` for Wasm EH and `none` for Emscripten EH. This was a common LLVM flag which we didn't directly use but fed LLVM because it was a common flag. Recently a series of Clang+LLVM EH flag refactoring was done, and now LLVM is using `-exception-model` to control all EH modes. So Emscripten EH will be enabled by `-exception-model=emscripten`, and Wasm EH by `-exception-model=wasm`, and we don't need the Wasm-specific LLVM flags. `-enable-emscripten-cxx-exceptions` was removed in #27704. This removes `-wasm-enable-eh`. This has to land before https://github.com/llvm/llvm-project/pull/224313. --- tools/building.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/building.py b/tools/building.py index 9558582ebdb85..7755d4ee3ab30 100644 --- a/tools/building.py +++ b/tools/building.py @@ -332,8 +332,6 @@ def lld_flags(args): for a in llvm_backend_args(): args += ['-mllvm', a] - if settings.WASM_EXCEPTIONS: - args += ['-mllvm', '-wasm-enable-eh'] if settings.WASM_EXCEPTIONS or settings.SUPPORT_LONGJMP == 'wasm': args += ['-mllvm', '-exception-model=wasm'] elif not settings.DISABLE_EXCEPTION_CATCHING: From 86c76cdd488df85397b6c180c88c1acd4b3345e2 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 18 Sep 2026 03:53:24 +0000 Subject: [PATCH 2/2] Temporarily skip EH LTO tests --- test/decorators.py | 2 ++ test/test_core.py | 2 ++ test/test_other.py | 1 + 3 files changed, 5 insertions(+) diff --git a/test/decorators.py b/test/decorators.py index 538ed5f7a7573..85c17ddd896fb 100644 --- a/test/decorators.py +++ b/test/decorators.py @@ -562,6 +562,8 @@ def with_all_eh_sjlj(func): def metafunc(self, mode, *args, **kwargs): if common.EMTEST_VERBOSE: print(f'parameterize:eh_mode={mode}') + if '-flto' in self.cflags or '-flto=thin' in self.cflags: + self.skipTest('LTO EH tests are temporarily disabled until https://github.com/llvm/llvm-project/pull/224313 lands') if mode in {'wasm', 'wasm_legacy'}: if self.is_wasm2js(): self.skipTest('wasm2js does not support wasm EH/SjLj') diff --git a/test/test_core.py b/test/test_core.py index 99d7578a98f78..6197ad969ad77 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -1167,6 +1167,8 @@ def test_exceptions(self): @requires_wasm_eh def test_exceptions_with_and_without_longjmp(self): + if '-flto' in self.cflags or '-flto=thin' in self.cflags: + self.skipTest('LTO EH tests are temporarily disabled until https://github.com/llvm/llvm-project/pull/224313 lands') self.set_setting('EXCEPTION_DEBUG') self.maybe_closure() # Emscripten EH with and without Emscripten SjLj support diff --git a/test/test_other.py b/test/test_other.py index e077c568b8593..c102e3992b10a 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -8882,6 +8882,7 @@ def test_lto_flags(self): # We have LTO tests covered in 'wasmltoN' targets in test_core.py, but they # don't run as a part of Emscripten CI, so we add a separate LTO test here. + @disabled('LTO EH tests are temporarily disabled until https://github.com/llvm/llvm-project/pull/224313 lands') @requires_wasm_eh @parameterized({ '': (['-sWASM_LEGACY_EXCEPTIONS=0'],),