Skip to content

Commit

Permalink
Emscripten 3.1.68 (pyodide#5390)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodmane authored Jan 30, 2025
1 parent 3bad273 commit 6c3d59b
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Makefile.envs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export PYVERSION ?= 3.12.7
export PYODIDE_EMSCRIPTEN_VERSION ?= 3.1.67
export PYODIDE_EMSCRIPTEN_VERSION ?= 3.1.68
export PYODIDE_VERSION ?= 0.28.0.dev0
export PYODIDE_ABI_VERSION ?= 2025_0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b2cb343f843580827b4bbed9ab2d3141ac19fa68 Mon Sep 17 00:00:00 2001
From a61452cd705f2f6f5673a1d685dfb1272d6c50de Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Fri, 2 Jun 2023 11:59:32 -0700
Subject: [PATCH 1/6] Add back fs.findObject and fs.readFile in loadLibData
Subject: [PATCH 1/5] Add back fs.findObject and fs.readFile in loadLibData

See upstream PR:
https://github.com/emscripten-core/emscripten/pull/19513
Expand All @@ -10,10 +10,10 @@ https://github.com/emscripten-core/emscripten/pull/19513
1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/library_dylink.js b/src/library_dylink.js
index a450db61c..608be951e 100644
index da269a48b..7173a77c6 100644
--- a/src/library_dylink.js
+++ b/src/library_dylink.js
@@ -998,14 +998,23 @@ var LibraryDylink = {
@@ -1013,14 +1013,23 @@ var LibraryDylink = {
#endif

// for wasm, we can use fetch for async, but for fs mode we can only imitate it
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From c745ab7eb3160b8701ad718b95ebbab19eadc024 Mon Sep 17 00:00:00 2001
From 86ecaa8d44125ee49d5c891dfdf560591baf3744 Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Fri, 19 May 2023 12:19:00 -0700
Subject: [PATCH 2/6] Add useful error when symbol resolution fails
Subject: [PATCH 2/5] Add useful error when symbol resolution fails

Currently if symbol resolution fails, we get:
```js
Expand All @@ -19,10 +19,10 @@ symbol.
1 file changed, 3 insertions(+)

diff --git a/src/library_dylink.js b/src/library_dylink.js
index 608be951e..81a2b03f7 100644
index 7173a77c6..e2ee18f9f 100644
--- a/src/library_dylink.js
+++ b/src/library_dylink.js
@@ -714,6 +714,9 @@ var LibraryDylink = {
@@ -723,6 +723,9 @@ var LibraryDylink = {
var resolved;
stubs[prop] = (...args) => {
resolved ||= resolveSymbol(prop);
Expand Down
16 changes: 8 additions & 8 deletions emsdk/patches/0003-Changes-for-JSPI.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 894469c2833cdfe429f249f97cecf9b3fcd0c661 Mon Sep 17 00:00:00 2001
From 80d5198a5278a30c692bb30eb225ad4dcfb0ce7b Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Thu, 22 Jun 2023 18:53:22 -0700
Subject: [PATCH 3/6] Changes for JSPI
Subject: [PATCH 3/5] Changes for JSPI

---
src/library.js | 2 +-
Expand All @@ -11,7 +11,7 @@ Subject: [PATCH 3/6] Changes for JSPI
4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/library.js b/src/library.js
index 09b4f4fb6..1f120bbd3 100644
index ebcf7b789..37a74c0a5 100644
--- a/src/library.js
+++ b/src/library.js
@@ -495,7 +495,7 @@ addToLibrary({
Expand All @@ -24,7 +24,7 @@ index 09b4f4fb6..1f120bbd3 100644
},
#elif !SUPPORT_LONGJMP
diff --git a/src/library_dylink.js b/src/library_dylink.js
index 81a2b03f7..544a7581d 100644
index e2ee18f9f..10282f229 100644
--- a/src/library_dylink.js
+++ b/src/library_dylink.js
@@ -73,6 +73,7 @@ var LibraryDylink = {
Expand Down Expand Up @@ -58,12 +58,12 @@ index 0a9fb43b1..eaa9021a9 100644

function storeException(varName, excPtr) {
diff --git a/src/preamble.js b/src/preamble.js
index 61d0858a9..928826752 100644
index d37cb9fe7..b181c4401 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -18,6 +18,10 @@
#include "runtime_pthread.js"
#endif
@@ -14,6 +14,10 @@
// An online HTML version (which may be of a different version of Emscripten)
// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html

+if(!Module.wrapException) {
+ Module.wrapException = (e) => e;
Expand Down
4 changes: 2 additions & 2 deletions emsdk/patches/0004-Raise-when-no-argument-is-given.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 8401900a8e0d3c6f9ac6e00257784668ebf4d555 Mon Sep 17 00:00:00 2001
From a01750b4c776b675c26da9a5fe90d6cf9f7df524 Mon Sep 17 00:00:00 2001
From: ryanking13 <[email protected]>
Date: Sat, 20 Jan 2024 19:02:32 +0900
Subject: [PATCH 4/6] Raise when no argument is given
Subject: [PATCH 4/5] Raise when no argument is given

Emscripten 3.1.51 does not raise an error when no argument is given.
Some build tools (e.g. ffmpeg) relies on this behavior, so we should
Expand Down
8 changes: 4 additions & 4 deletions emsdk/patches/0005-Make-seek-work-on-dev-null-22886.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b14d86eb6014ced11fd64cfe9b156c316246006c Mon Sep 17 00:00:00 2001
From d856c3bbcd983946c883c1be91db5742a64db63e Mon Sep 17 00:00:00 2001
From: Hood Chatham <[email protected]>
Date: Mon, 18 Nov 2024 20:55:25 +0100
Subject: [PATCH 5/6] Make seek work on `/dev/null` (#22886)
Subject: [PATCH 5/5] Make seek work on `/dev/null` (#22886)

Seeking `/dev/null` should work and do nothing instead of returning
`EPIPE`. This fixes it.
Expand All @@ -12,10 +12,10 @@ This can be removed when we update to Emscripten 3.1.72.
1 file changed, 1 insertion(+)

diff --git a/src/library_fs.js b/src/library_fs.js
index d3f70f83f..ad583fddf 100644
index c01999dfa..04bf4f6e3 100644
--- a/src/library_fs.js
+++ b/src/library_fs.js
@@ -1352,6 +1352,7 @@ FS.staticInit();
@@ -1355,6 +1355,7 @@ FS.staticInit();
FS.registerDevice(FS.makedev(1, 3), {
read: () => 0,
write: (stream, buffer, offset, length, pos) => length,
Expand Down
16 changes: 16 additions & 0 deletions src/js/struct_info_generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,22 @@
"format": 0,
"palette": 4
},
"SDL_RWops": {
"__size__": 32,
"hidden": {
"__size__": 12,
"mem": {
"__size__": 12,
"base": 20,
"stop": 28
},
"stdio": {
"__size__": 8,
"fp": 24
}
},
"type": 16
},
"SDL_Rect": {
"__size__": 16,
"h": 12,
Expand Down

0 comments on commit 6c3d59b

Please sign in to comment.