-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__wasm_longjmp
not linked from compiler_rt-wasm-sjlj
when using WASM standards flags
#22566
Comments
Yes, IIUC |
This is due to Lines 802 to 805 in 893e0a9
But it accidentally ended up disabling support for Wasm SjLj as well. I think if settings.PURE_WASI:
...
if settings.SUPPORT_LONGJMP == 'emscripten':
settings.SUPPORT_LONGJMP = 0 can fix this. I can go ahead and make this change, but before that, aren't we supposed to also disable Emscripten EH when |
I don't think we want to prevent folks from experimenting with Emscripten EH or Emscripten SJLJ in PURE_WASI mode. I think the indent here was to change the defaults. So maybe doing |
Then should we disable (JS-based) throwing too, like this? if not settings.WASM_EXCEPTIONS:
default_setting('SUPPORT_LONGJMP', 0)
default_setting('DISABLE_EXCEPTION_CATCHING', 1)
default_setting('DISABLE_EXCEPTION_THROWING', 1) |
No I think |
Version of emscripten/emsdk:
This is the version installed by the latest
emsdk
Docker image.Failing command line in full:
Full link command and output with
-v
appended:I have been trying to build a 64-bit program with
emcc
to be as closely bound by the (granted, experimental) standards as possible. I am using-sWASM=1 -sMEMORY64=1 -sSTANDALONE_WASM=1 -sPURE_WASI=1 -fwasm-exceptions
as compile-time options to attempt to achieve this. However this leads toemcc
attempting to link against-lcompiler_rt
rather thanlibcompiler_rt-wasm-sjlj
, yielding the aboveundefined symbol: __wasm_longjmp
issue.I 'fixed' it by running
embuilder --wasm64 build libcompiler_rt-wasm-sjlj
, followed by adding-lcompiler_rt-wasm-sjlj
to the compilation arguments. I noticed that inembuilder.py
it claims that the user is not supposed to need to run it directly, so I assume that emcc is just not selecting the right library for the linker -- or my compile options just don't make sense together. I am relatively new to building with Emscripten so it is possible that I am missing something basic.Thanks for building Emscripten!
The text was updated successfully, but these errors were encountered: