Skip to content

Commit 3520c92

Browse files
authored
Emscripten 3.1.72 (pyodide#5399)
1 parent b4aea70 commit 3520c92

8 files changed

+74
-57
lines changed

Makefile.envs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export PYVERSION ?= 3.12.7
2-
export PYODIDE_EMSCRIPTEN_VERSION ?= 3.1.71
2+
export PYODIDE_EMSCRIPTEN_VERSION ?= 3.1.72
33
export PYODIDE_VERSION ?= 0.28.0.dev0
44
export PYODIDE_ABI_VERSION ?= 2025_0
55

emsdk/patches/0001-Add-back-fs.findObject-and-fs.readFile-in-loadLibDat.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From e1dedccbf759263efeb8a9b44a68e7a3af65b1ae Mon Sep 17 00:00:00 2001
1+
From de71d75de3f99cf57bccbf821b458c054dd6bf4a Mon Sep 17 00:00:00 2001
22
From: Hood Chatham <[email protected]>
33
Date: Fri, 2 Jun 2023 11:59:32 -0700
4-
Subject: [PATCH 1/6] Add back fs.findObject and fs.readFile in loadLibData
4+
Subject: [PATCH 1/5] Add back fs.findObject and fs.readFile in loadLibData
55

66
See upstream PR:
77
https://github.com/emscripten-core/emscripten/pull/19513
@@ -10,7 +10,7 @@ https://github.com/emscripten-core/emscripten/pull/19513
1010
1 file changed, 11 insertions(+), 2 deletions(-)
1111

1212
diff --git a/src/library_dylink.js b/src/library_dylink.js
13-
index da269a48b..7173a77c6 100644
13+
index dee697661..69542d2b8 100644
1414
--- a/src/library_dylink.js
1515
+++ b/src/library_dylink.js
1616
@@ -1013,14 +1013,23 @@ var LibraryDylink = {

emsdk/patches/0002-Add-useful-error-when-symbol-resolution-fails.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 7ed66801d56b91835f1f74cd3d8e9882b3a1dba4 Mon Sep 17 00:00:00 2001
1+
From 030753bef38328b5b1a691d96823de60ff509182 Mon Sep 17 00:00:00 2001
22
From: Hood Chatham <[email protected]>
33
Date: Fri, 19 May 2023 12:19:00 -0700
4-
Subject: [PATCH 2/6] Add useful error when symbol resolution fails
4+
Subject: [PATCH 2/5] Add useful error when symbol resolution fails
55

66
Currently if symbol resolution fails, we get:
77
```js
@@ -19,7 +19,7 @@ symbol.
1919
1 file changed, 3 insertions(+)
2020

2121
diff --git a/src/library_dylink.js b/src/library_dylink.js
22-
index 7173a77c6..e2ee18f9f 100644
22+
index 69542d2b8..b3440d9dc 100644
2323
--- a/src/library_dylink.js
2424
+++ b/src/library_dylink.js
2525
@@ -723,6 +723,9 @@ var LibraryDylink = {

emsdk/patches/0003-Changes-for-JSPI.patch

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
From 66f4951f3ca8e75c4d71e71acc8f11592e33f1b7 Mon Sep 17 00:00:00 2001
1+
From d4210b8a3a483bef0edce7cf6fed1c889e447e05 Mon Sep 17 00:00:00 2001
22
From: Hood Chatham <[email protected]>
33
Date: Thu, 22 Jun 2023 18:53:22 -0700
4-
Subject: [PATCH 3/6] Changes for JSPI
4+
Subject: [PATCH 3/5] Changes for JSPI
55

66
---
77
src/library.js | 2 +-
88
src/library_dylink.js | 3 ++-
99
src/parseTools.mjs | 2 +-
10-
src/preamble.js | 7 +++++++
11-
4 files changed, 11 insertions(+), 3 deletions(-)
10+
src/preamble.js | 5 +++++
11+
4 files changed, 9 insertions(+), 3 deletions(-)
1212

1313
diff --git a/src/library.js b/src/library.js
14-
index 78368ba2b..636353c49 100644
14+
index 59f530db8..8c8121624 100644
1515
--- a/src/library.js
1616
+++ b/src/library.js
1717
@@ -494,7 +494,7 @@ addToLibrary({
@@ -24,7 +24,7 @@ index 78368ba2b..636353c49 100644
2424
},
2525
#elif !SUPPORT_LONGJMP
2626
diff --git a/src/library_dylink.js b/src/library_dylink.js
27-
index e2ee18f9f..10282f229 100644
27+
index b3440d9dc..5cbd4c487 100644
2828
--- a/src/library_dylink.js
2929
+++ b/src/library_dylink.js
3030
@@ -73,6 +73,7 @@ var LibraryDylink = {
@@ -45,7 +45,7 @@ index e2ee18f9f..10282f229 100644
4545
#endif
4646
#if !DISABLE_EXCEPTION_CATCHING
4747
diff --git a/src/parseTools.mjs b/src/parseTools.mjs
48-
index 0a9fb43b1..eaa9021a9 100644
48+
index ca474affa..300f38e38 100644
4949
--- a/src/parseTools.mjs
5050
+++ b/src/parseTools.mjs
5151
@@ -585,7 +585,7 @@ function makeThrow(excPtr) {
@@ -58,7 +58,7 @@ index 0a9fb43b1..eaa9021a9 100644
5858

5959
function storeException(varName, excPtr) {
6060
diff --git a/src/preamble.js b/src/preamble.js
61-
index d37cb9fe7..b181c4401 100644
61+
index d924c4ab9..f80aae1ff 100644
6262
--- a/src/preamble.js
6363
+++ b/src/preamble.js
6464
@@ -14,6 +14,10 @@
@@ -72,16 +72,14 @@ index d37cb9fe7..b181c4401 100644
7272
#if RELOCATABLE
7373
{{{ makeModuleReceiveWithVar('dynamicLibraries', undefined, '[]', true) }}}
7474
#endif
75-
@@ -931,6 +935,9 @@ function getWasmImports() {
76-
// Receives the wasm imports, returns the exports.
77-
function createWasm() {
75+
@@ -1054,6 +1058,7 @@ function createWasm() {
76+
#endif // WASM_ASYNC_COMPILATION
77+
7878
var info = getWasmImports();
79-
+ if (Module.adjustWasmImports) {
80-
+ Module.adjustWasmImports(info);
81-
+ }
82-
// Load the wasm module and create an instance of using native support in the JS engine.
83-
// handle a generated wasm instance, receiving its exports and
84-
// performing other necessary setup
79+
+ Module.adjustWasmImports?.(info);
80+
81+
#if expectToReceiveOnModule('instantiateWasm')
82+
// User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback
8583
--
8684
2.34.1
8785

emsdk/patches/0004-Raise-when-no-argument-is-given.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From c2a07f196033e782b999de35d50d5ba05d253aef Mon Sep 17 00:00:00 2001
1+
From ef90544089aa65f89f3924ff8b212c767a084b02 Mon Sep 17 00:00:00 2001
22
From: ryanking13 <[email protected]>
33
Date: Sat, 20 Jan 2024 19:02:32 +0900
4-
Subject: [PATCH 4/6] Raise when no argument is given
4+
Subject: [PATCH 4/5] Raise when no argument is given
55

66
Emscripten 3.1.51 does not raise an error when no argument is given.
77
Some build tools (e.g. ffmpeg) relies on this behavior, so we should
@@ -13,7 +13,7 @@ Upstream issue: https://github.com/emscripten-core/emscripten/issues/21116
1313
1 file changed, 3 insertions(+)
1414

1515
diff --git a/emcc.py b/emcc.py
16-
index fcaf2b91e..385af3f67 100644
16+
index 520ad4041..daa296864 100644
1717
--- a/emcc.py
1818
+++ b/emcc.py
1919
@@ -660,6 +660,9 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P

emsdk/patches/0005-Make-seek-work-on-dev-null-22886.patch

Lines changed: 0 additions & 28 deletions
This file was deleted.

emsdk/patches/0006-sdl2_image-wasm-sjlj-variant.patch renamed to emsdk/patches/0005-sdl2_image-wasm-sjlj-variant.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 032aed724e075a673bef37e97a9c1d5dfccb80b9 Mon Sep 17 00:00:00 2001
1+
From 37539a89a25855f8c524f9d4f8ae6c27b49ed5a7 Mon Sep 17 00:00:00 2001
22
From: Hood Chatham <[email protected]>
33
Date: Fri, 31 Jan 2025 11:42:59 +0100
4-
Subject: [PATCH 6/6] sdl2_image wasm-sjlj variant
4+
Subject: [PATCH 5/5] sdl2_image wasm-sjlj variant
55

66
Upstream PR:
77
https://github.com/emscripten-core/emscripten/pull/23554

src/js/struct_info_generated.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,12 @@
321321
"ISIG": 1,
322322
"IUTF8": 16384,
323323
"IXON": 1024,
324+
"KMOD_LALT": 256,
325+
"KMOD_LCTRL": 64,
326+
"KMOD_LSHIFT": 1,
327+
"KMOD_RALT": 512,
328+
"KMOD_RCTRL": 128,
329+
"KMOD_RSHIFT": 2,
324330
"MAP_ANONYMOUS": 32,
325331
"MAP_FIXED": 16,
326332
"MAP_PRIVATE": 2,
@@ -364,8 +370,49 @@
364370
"RTLD_NODELETE": 4096,
365371
"RTLD_NOW": 2,
366372
"R_OK": 4,
373+
"SDLK_LALT": 1250,
374+
"SDLK_LCTRL": 1248,
375+
"SDLK_LSHIFT": 1249,
376+
"SDLK_RALT": 1254,
377+
"SDLK_RCTRL": 1252,
378+
"SDLK_RSHIFT": 1253,
379+
"SDL_APPACTIVE": 4,
380+
"SDL_APPINPUTFOCUS": 2,
381+
"SDL_APPMOUSEFOCUS": 1,
382+
"SDL_BUTTON_WHEELDOWN": 5,
383+
"SDL_BUTTON_WHEELUP": 4,
384+
"SDL_FINGERDOWN": 1792,
385+
"SDL_FINGERMOTION": 1794,
386+
"SDL_FINGERUP": 1793,
387+
"SDL_GL_ALPHA_SIZE": 3,
388+
"SDL_GL_DEPTH_SIZE": 6,
389+
"SDL_GL_MULTISAMPLEBUFFERS": 13,
390+
"SDL_GL_MULTISAMPLESAMPLES": 14,
391+
"SDL_GL_STENCIL_SIZE": 7,
392+
"SDL_HWPALETTE": 2097152,
393+
"SDL_HWSURFACE": 134217729,
394+
"SDL_INIT_JOYSTICK": 512,
395+
"SDL_JOYAXISMOTION": 1536,
396+
"SDL_JOYBUTTONDOWN": 1539,
397+
"SDL_JOYBUTTONUP": 1540,
398+
"SDL_KEYDOWN": 768,
399+
"SDL_KEYUP": 769,
400+
"SDL_MOUSEBUTTONDOWN": 1025,
401+
"SDL_MOUSEBUTTONUP": 1026,
402+
"SDL_MOUSEMOTION": 1024,
403+
"SDL_MOUSEWHEEL": 1027,
404+
"SDL_OPENGL": 67108864,
367405
"SDL_PIXELFORMAT_RGBA8888": -2042224636,
406+
"SDL_QUIT": 256,
407+
"SDL_SRCALPHA": 65536,
408+
"SDL_TEXTINPUT": 771,
368409
"SDL_TOUCH_MOUSEID": -1,
410+
"SDL_VIDEORESIZE": 28673,
411+
"SDL_WINDOWEVENT": 512,
412+
"SDL_WINDOWEVENT_FOCUS_GAINED": 12,
413+
"SDL_WINDOWEVENT_FOCUS_LOST": 13,
414+
"SDL_WINDOWEVENT_HIDDEN": 2,
415+
"SDL_WINDOWEVENT_SHOWN": 1,
369416
"SEEK_CUR": 1,
370417
"SEEK_END": 2,
371418
"SEEK_SET": 0,

0 commit comments

Comments
 (0)