Skip to content

--embind-emit-tsd breaks with -fwasm-exceptions on latest version of node #21405

@here-abarany

Description

@here-abarany

When linking with the --embind-emit-tsd option in code that uses -fwasm-exceptions on node 21.6.2 I get the following error:

/usr/bin/node: bad option: --experimental-wasm-eh

It seems that using --experimental-wasm-eh was added to fix this option for older versions of node, but WASM exceptions must no longer be considered "experimental" and the option was removed.

Version of emscripten/emsdk:
Installed through the Arch Linux system package.

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.53-git (ce5114bdd2175c7297583d3c25a53ca95d22f4ce)
clang version 19.0.0git (/startdir/llvm-project febb4c42b192ed7c88c17f91cb903a59acf20baf)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /opt/emscripten-llvm/bin

Full link command and output with -v appended:

/usr/lib/emscripten/em++  -fno-strict-aliasing -fwasm-exceptions -O3 -DNDEBUG -DNDEBUG -flto=thin -sALLOW_MEMORY_GROWTH=1 -sEXPORT_NAME=ElevationMergeJs -lembind -sMODULARIZE=1 --embind-emit-tsd /home/abarany/src/pxpipe-cpp/build/Emscripten/output-binaries/bin/elevation-merge-js.d.ts -v @CMakeFiles/elevation-merge-js.dir/objects1.rsp -o ../../output-binaries/bin/elevation-merge-js.js @CMakeFiles/elevation-merge-js.dir/linkLibs.rsp

 /opt/emscripten-llvm/bin/clang --version
 /opt/emscripten-llvm/bin/wasm-ld -o ../../output-binaries/bin/elevation-merge-js.wasm CMakeFiles/elevation-merge-js.dir/src/ElevationMergeJs.cpp.o ../../output-binaries/lib/libpxp_elevation-merge.a ../../output-binaries/lib/libpxp_elevation-core.a ../../output-binaries/lib/libpxp_geographic-geometry.a ../../output-binaries/lib/libpxp_geographic.a ../../output-binaries/lib/libpxp_geometry.a ../../output-binaries/lib/libpxp_math.a ../../output-binaries/lib/libpxp_foundation.a /home/abarany/src/pxpipe-externals/install-web/lib/libClipper2Z.a /home/abarany/src/pxpipe-externals/install-web/lib/libCDT.a -L/home/abarany/.emscripten_cache/sysroot/lib/wasm32-emscripten/thinlto --whole-archive -lembind-rtti --no-whole-archive -lGL-getprocaddr -lal -lhtml5 -lstubs -lnoexit -lc -ldlmalloc -lcompiler_rt-wasm-sjlj -lc++-except -lc++abi-except -lunwind-except -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -wasm-enable-sjlj -mllvm -disable-lsr -mllvm -wasm-enable-eh -mllvm -exception-model=wasm /tmp/tmpfjr11f_jlibemscripten_js_symbols.so --strip-debug -u__cxa_atexit --export=stackAlloc --export=__get_temp_ret --export=__set_temp_ret --export=__trap --export=__wasm_call_ctors --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=main --export-if-defined=__main_argc_argv --export-table -z stack-size=65536 --initial-memory=16777216 --max-memory=2147483648 --no-entry --table-base=1 --global-base=1024
 /opt/emscripten-llvm/bin/llvm-objcopy ../../output-binaries/bin/elevation-merge-js.wasm ../../output-binaries/bin/elevation-merge-js.wasm --remove-section=.debug* --remove-section=producers
 /usr/bin/wasm-emscripten-finalize --dyncalls-i64 --pass-arg=legalize-js-interface-exported-helpers ../../output-binaries/bin/elevation-merge-js.wasm -o ../../output-binaries/bin/elevation-merge-js.wasm --detect-features
 /usr/bin/node /usr/lib/emscripten/src/compiler.mjs /tmp/tmputmd7m30.json
 /usr/bin/node /usr/lib/emscripten/src/compiler.mjs /tmp/tmpvy7p1_r_.json
 /usr/bin/node --experimental-wasm-eh /tmp/emscripten_temp_htt01ifn/tsgen_a.out.js
/usr/bin/node: bad option: --experimental-wasm-eh

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions