You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version of emscripten/emsdk:
Please include the output emcc -v here
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.61 (67fa4c1)
clang version 19.0.0git (https:/github.com/llvm/llvm-project 7cfffe74eeb68fbb3fb9706ac7071f8caeeb6520)
Target: wasm32-unknown-emscripten
Thread model: posix
Issue
I'm building an application with JSPI, SPLIT_MODULE and after splitting the wasm module, it's working (with some kinks).
However, when I added in the MAIN_MODULE flag, I get an error when trying to load the deferred module.
LinkError: WebAssembly.instantiate(): Import #13 "primary" "load_secondary_module_status": imported mutable global must be a WebAssembly.Global object
I suspect this is because the load_secondary_module_status global variable is not recognized as an export created by wasm-split here, and hence got it's type replaced by a number value.
Should this be fixed by prepending this variable with a '%'?
Mintyboi
changed the title
load_secondary_module_status was not relocated with emscripten's MAIN_MODULE flagload_secondary_module_status not recognized as a global object with emscripten's MAIN_MODULE flag
Sep 3, 2024
Please include the following in your bug report:
Version of emscripten/emsdk:
Please include the output
emcc -v
hereemcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.61 (67fa4c1)
clang version 19.0.0git (https:/github.com/llvm/llvm-project 7cfffe74eeb68fbb3fb9706ac7071f8caeeb6520)
Target: wasm32-unknown-emscripten
Thread model: posix
Issue
I'm building an application with JSPI, SPLIT_MODULE and after splitting the wasm module, it's working (with some kinks).
However, when I added in the MAIN_MODULE flag, I get an error when trying to load the deferred module.
I suspect this is because the
load_secondary_module_status
global variable is not recognized as an export created by wasm-split here, and hence got it's type replaced by a number value.emscripten/src/library_dylink.js
Line 265 in ce52783
This issue can be reproduced using the existing tests in emscripten by adding a
-sMAIN_MODULE=2
.The text was updated successfully, but these errors were encountered: