[WebAssembly] Add Wasm SjLj option support for clang
This adds support for Wasm SjLj in clang. Also this sets the new `-mllvm -wasm-enable-eh` option for Wasm EH. Note there is a little unfortunate inconsistency there: Wasm EH is enabled by a clang option `-fwasm-exceptions`, which sets `-mllvm -wasm-enable-eh` in the backend options. It also sets `-exception-model=wasm` but this is done in the common code. Wasm SjLj doesn't have a clang-level option like `-fwasm-exceptions`. `-fwasm-exceptions` was added because each exception model has its corresponding `-f***-exceptions`, but I'm not sure if adding a new option like `-fwasm-sjlj` or something is a good idea. So the current plan is Emscripten sets `-mllvm -wasm-enable-sjlj` if Wasm SJLj is enabled in its settings.js, as it does for Emscripten EH/SjLj (it sets `-mllvm -enable-emscripten-cxx-exceptions` for Emscripten EH and `-mllvm -enable-emscripten-sjlj` for Emscripten SjLj). And setting this enables the exception handling feature, and also sets `-e...
parent
6609892a
Please register or sign in to comment