diff --git a/src/api/python/pyproject.toml b/src/api/python/pyproject.toml index 243a85a94..52c6db594 100644 --- a/src/api/python/pyproject.toml +++ b/src/api/python/pyproject.toml @@ -17,7 +17,7 @@ build-backend = "setuptools.build_meta" [tool.pyodide.build] cflags = "-fwasm-exceptions -sSUPPORT_LONGJMP=wasm" cxxflags = "-fwasm-exceptions -sSUPPORT_LONGJMP=wasm" -ldflags = "-fwasm-exceptions -sSUPPORT_LONGJMP=wasm -sWASM_BIGINT" +ldflags = "-fwasm-exceptions -sSUPPORT_LONGJMP=wasm -sWASM_BIGINT -sSIDE_MODULE=1" # --- cibuildwheel: produce a PyPI-publishable pyemscripten wheel ------------- [tool.cibuildwheel] diff --git a/src/api/python/setup.py b/src/api/python/setup.py index 029b5ea86..b199effd3 100644 --- a/src/api/python/setup.py +++ b/src/api/python/setup.py @@ -51,7 +51,7 @@ if RELEASE_DIR is None: _wasm_eh = " -fwasm-exceptions -sSUPPORT_LONGJMP=wasm" build_env['CFLAGS'] = build_env.get('CFLAGS', '') + _wasm_eh build_env['CXXFLAGS'] = build_env.get('CXXFLAGS', '') + _wasm_eh - build_env['LDFLAGS'] = build_env.get('LDFLAGS', '') + _wasm_eh + " -sWASM_BIGINT" + build_env['LDFLAGS'] = build_env.get('LDFLAGS', '') + _wasm_eh + " -sWASM_BIGINT -sSIDE_MODULE=1" IS_SINGLE_THREADED = True ENABLE_LTO = False # build with pthread doesn't work. The WASM bindings are also single threaded.