wasi-sdk icon indicating copy to clipboard operation
wasi-sdk copied to clipboard

lto link error undefined symbol: setjmp

Open calvin2021y opened this issue 6 months ago • 9 comments

I try build with --target=wasm32-wasi -mllvm -wasm-enable-sjlj and -flto=full

get this error:

undefined symbol: setjmp
undefined symbol: longjmp
nm test.o |grep jmp
         U longjmp
         U setjmp

If I remove -flto=full, all work as expect:

 nm test.o |grep jmp
         U __c_longjmp
         U __wasm_longjmp
         U saveSetjmp
         U testSetjmp

calvin2021y avatar Aug 22 '24 13:08 calvin2021y