[clang] [llvm] WebAssembly: Stop changing MCAsmInfo's ExceptionsType based on flags (PR #146343)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 1 22:06:47 PDT 2025
arsenm wrote:
> And it was a little confusing that the PR description argues we should remove `-wasm-enable-eh/sjlj` options, which disagree, when the code seems to fix something else. Those flags control behaviors, not exception models, so we still need them. For example, someone might want to use only SjLj support but not EH support, but because we implement SjLj using EH constructs, we still need `-exception-model=wasm` and `-wasm-enable-sjlj`, but in this case not `-wasm-enable-eh`.
There should be no cl::opts that change backend behavior like this. It needs to be part of the triple, or at worst a module flag explicitly in the IR. This is worse than TargetOptions, since it's an ABI option hidden in the backend. We should not have program state hidden in structs outside of the IR.
Additionally requiring this second flag on top of the -exception-model flag is an obnoxious user experience
https://github.com/llvm/llvm-project/pull/146343
More information about the cfe-commits
mailing list