Skip to content

Commit

Permalink
Revert "Update emscripten (emscripten-forge#1241)" (emscripten-forge#…
Browse files Browse the repository at this point in the history
…1248)

This reverts commit 58d834b.
  • Loading branch information
DerThorsten authored and KGB99 committed Jul 31, 2024
1 parent 50b4171 commit 06eb6de
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 196 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 137dae4dbdf9a192551582cdae827b085510956f Mon Sep 17 00:00:00 2001
From 0170462a78e86de9ee95017bfa7e4a3dd620a375 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] 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 aa90bea2b..1e67818a1 100644
index d7676cdc2..f616d230d 100644
--- a/src/library_dylink.js
+++ b/src/library_dylink.js
@@ -994,14 +994,23 @@ var LibraryDylink = {
@@ -993,14 +993,23 @@ var LibraryDylink = {
#endif

// for wasm, we can use fetch for async, but for fs mode we can only imitate it
Expand All @@ -40,5 +40,5 @@ index aa90bea2b..1e67818a1 100644
var libFile = locateFile(libName);
if (flags.loadAsync) {
--
2.34.1
2.25.1

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e0cb884277200310eba263dcce5a7b1c4567bae6 Mon Sep 17 00:00:00 2001
From a8bdb50a29062ee70c8667e4fd94dde47917f8fa 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] Add useful error when symbol resolution fails

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

diff --git a/src/library_dylink.js b/src/library_dylink.js
index 1e67818a1..cea3ce05d 100644
index d96e6b425..7f63b5c5e 100644
--- a/src/library_dylink.js
+++ b/src/library_dylink.js
@@ -709,6 +709,9 @@ var LibraryDylink = {
@@ -727,6 +727,9 @@ var LibraryDylink = {
var resolved;
stubs[prop] = (...args) => {
resolved ||= resolveSymbol(prop);
stubs[prop] = function() {
if (!resolved) resolved = resolveSymbol(prop);
+ if (!resolved) {
+ throw new Error(`Dynamic linking error: cannot resolve symbol ${prop}`);
+ }
return resolved(...args);
return resolved.apply(null, arguments);
};
}
--
2.34.1
2.25.1

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions recipes/recipes/emscripten_emscripten-wasm32/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
context:
name: emscripten_emscripten-wasm32
version: 3.1.58
version: 3.1.45

build:
number: 0
number: 29

outputs:
- package:
Expand Down

0 comments on commit 06eb6de

Please sign in to comment.