[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

Heejin Ahn via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 8 23:37:00 PST 2024


aheejin wrote:

> In terms of getting this landed and tested, I wonder which path we should take:
> 
> 1. Land this now, without tests, then update emscripten then come back and flip the default, at which point the existing tests will get updated.
> 2. Duplicate/update the the existing tests to tests both modes, then delete those changes once we flip the default.
> 
> Personally I think I'd be happy with (1) since this is a behind and experimental flag.
> 
> What do others think? @aheejin ?

Come to think of it, should we even introduce this experimental option? Adding `if (NewOption) ... else ...` everywhere makes the code complicated. Can we just do
1. Add library functions in emscripten
2. Replace the current logic in LLVM with new code. (Without `if`~`else`). Tests can be updated with this.
3. Remove old library functions in emscripten.
?

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


More information about the cfe-commits mailing list