build-all.py wasm - move SIDE_MODULE=2 to cmake

Next to `EXPORTED_FUNCTIONS` and avoid possible issues with pyodide in the future (pyodide is using `SIDE_MODULE=1`, but currently not providing it libraries of type `MODULE`, only for shared ones).
This commit is contained in:
Andrej730
2025-10-17 19:01:37 +05:00
parent 0ce12c9297
commit 0e3f8cba8d
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -1434,7 +1434,7 @@ if "IfcOpenShell-Python" in targets:
ADDITIONAL_ARGS = "-Wl,-flat_namespace,-undefined,suppress"
if "wasm" in flags:
ADDITIONAL_ARGS = "-Wl,-undefined,suppress -sSIDE_MODULE=2"
ADDITIONAL_ARGS = "-Wl,-undefined,suppress"
# Override CMAKE_TOOLCHAIN_FILE because by default emscripten doesn't support building shared binaries.
if WASM_DEBUG:
os.environ["CMAKE_TOOLCHAIN_FILE"] = os.environ["WASM_TOOLCHAIN_FILE"]