-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
While working on upgrading Pyodide to Python3.9 I run into the following errors from wasm-opt when compiling packages (which are SIDE_MODULEs linked against Python stdlib):
[wasm-validator error in module] unexpected true: Imported global cannot be mutable
This occurs in a call like the following:
wasm-opt --strip-dwarf --post-emscripten --no-exit-runtime -O2 --low-memory-unused --fpcast-emu --pass-arg=max-func-params@61 --strip-debug --strip-producers build/lib.linux-x86_64-3.9/PIL/_imagingft.cpython-39-x86_64-linux-gnu.so -o build/lib.linux-x86_64-3.9/PIL/_imagingft.cpython-39-x86_64-linux-gnu.so --mvp-featuresI found that if I remove --mvp-features and add --enable-mutable-globals then the build succeeds and the test suite passes.
I made the following patch to remove --mvp-features and add --enable-mutable-globals to the wasm-opt calls:
https://github.com/hoodmane/pyodide/blob/python-3.9/emsdk/patches/fix-wasm-validator-error.patch
My question is whether there is a better way to do this or a way to do it without patching emsdk.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels