-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
lto link error undefined symbol: setjmp #479
Comments
i guess you need |
my link step not call from clang, so I add I get this error when link: wasm-ld: error: /wasi/share/wasi-sysroot/lib/wasm32-wasi/llvm-lto/18.1.2-wasi-sdk/libsetjmp.a(rt.o): attempt to add bitcode file after LTO (__wasm_longjmp)
Error: wasm-ld failed with status: 1 |
The options for a quick fix would be to either (1) remove |
after add any suggestion how to run the binary with |
this looks like a bug. |
you can't run it.
|
thanks for explain. Is there a link I can download llvm19 sdk ? (like nightly build results) after |
if you are more interested in browsers, i guess it's better to try emscripten. (i'm not familiar with it.) |
Yes, emscripten has supported setjmp/longjmp for many years out-of-the-box. |
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
The text was updated successfully, but these errors were encountered: