From fef27a7cb0d0158a9e4ea6d08790fabadd03f639 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 3 Feb 2025 18:09:00 +0100 Subject: [PATCH] Update emscripten to 4.0.2, Python to 3.12.8, enable bulk memory --- .github/workflows/ci.yml | 20 ++++++++++---------- makepanda/makepanda.py | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18ce4881f9..04cea3eec7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -508,7 +508,7 @@ jobs: - name: Setup emsdk uses: mymindstorm/setup-emsdk@v14 with: - version: 3.1.70 + version: 4.0.2 actions-cache-folder: 'emsdk-cache' - name: Restore Python build cache @@ -516,19 +516,19 @@ jobs: uses: actions/cache/restore@v4 with: path: ~/python - key: cache-emscripten-python-3.12.7 + key: cache-emscripten-python-3.12.8 - name: Build Python 3.12 if: steps.cache-emscripten-python-restore.outputs.cache-hit != 'true' run: | - wget https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tar.xz - tar -xJf Python-3.12.7.tar.xz - (cd Python-3.12.7 && EM_CONFIG=$EMSDK/.emscripten python3 Tools/wasm/wasm_build.py emscripten-browser) - (cd Python-3.12.7/builddir/emscripten-browser && make install DESTDIR=~/python) - cp Python-3.12.7/builddir/emscripten-browser/Modules/_hacl/libHacl_Hash_SHA2.a ~/python/usr/local/lib - cp Python-3.12.7/builddir/emscripten-browser/Modules/_decimal/libmpdec/libmpdec.a ~/python/usr/local/lib - cp Python-3.12.7/builddir/emscripten-browser/Modules/expat/libexpat.a ~/python/usr/local/lib - rm -rf Python-3.12.7 + wget https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tar.xz + tar -xJf Python-3.12.8.tar.xz + (cd Python-3.12.8 && EM_CONFIG=$EMSDK/.emscripten python3 Tools/wasm/wasm_build.py emscripten-browser) + (cd Python-3.12.8/builddir/emscripten-browser && make install DESTDIR=~/python) + cp Python-3.12.8/builddir/emscripten-browser/Modules/_hacl/libHacl_Hash_SHA2.a ~/python/usr/local/lib + cp Python-3.12.8/builddir/emscripten-browser/Modules/_decimal/libmpdec/libmpdec.a ~/python/usr/local/lib + cp Python-3.12.8/builddir/emscripten-browser/Modules/expat/libexpat.a ~/python/usr/local/lib + rm -rf Python-3.12.8 - name: Save Python build cache id: cache-emscripten-python-save diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 614b2cbb45..89aed0d7ba 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1909,7 +1909,8 @@ def CompileLink(dll, obj, opts): cmd += ' -lc -lm' elif GetTarget() == 'emscripten': - cmd += " -s WARN_ON_UNDEFINED_SYMBOLS=1" + cmd += " -s WARN_ON_UNDEFINED_SYMBOLS=1 -mbulk-memory" + if GetOrigExt(dll) == ".exe": cmd += " -s EXIT_RUNTIME=1"