[llvm] WebAssembly: Stop changing MCAsmInfo's ExceptionsType based on flags (PR #146343)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 10 09:29:04 PST 2026


mcbarton wrote:

Hi @arsenm @dschuff @aheejin 

I was hoping you could enlighten me as to the purpose of this PR, and how changes how exception handling for web assembly. I work on a project called CppInterOp https://github.com/compiler-research/CppInterOp which builds upon llvm to provide C++ InterOperability in a way which is backwards compatible for a number of versions of llvm. We have an Emscripten build of this library so we can target webassembly. This PR has caused us issues in updating our library to be compatible with llvm 21. The PR where I upgrade the library to llvm 21 is here https://github.com/compiler-research/CppInterOp/pull/672 . Without reverting this PR as a patch, I am unable to pass our test which checks if we can handle exceptions in a web assembly environment. This test passes for llvm 20 fine. 

In the PR you will see the exception handling test I am referring to as the one where I have the following modification to deal with the case where we build with wasm exceptions. 

```
    std::vector<const char*> Args = {
    "-std=c++20",
    "-v",
    "-fwasm-exceptions",
    "-mllvm","-wasm-enable-sjlj"
  };
```

Do you know why this test might fail for llvm 21, despite passing for llvm 20. For example does this PR change the option which should be used when trying do exceptions in web assembly?

Happy to answer any questions you may have.

cc @vgvassilev 

https://github.com/llvm/llvm-project/pull/146343


More information about the llvm-commits mailing list