Skip to content

Commit

Permalink
Update emscripten to 4.0.2, Python to 3.12.8, enable bulk memory
Browse files Browse the repository at this point in the history
  • Loading branch information
rdb committed Feb 3, 2025
1 parent 6452907 commit fef27a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -508,27 +508,27 @@ 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
id: cache-emscripten-python-restore
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
Expand Down
3 changes: 2 additions & 1 deletion makepanda/makepanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit fef27a7

Please sign in to comment.