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

YAMAMOTO Takashi via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 10 18:17:00 PDT 2024


yamt 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.
>        ?

i implemented this way (`if-else`) becasue @sbc100 told me it's necessary for emscripten to support both methods for a short period.


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


More information about the cfe-commits mailing list