Skip to content

Commit 58c1530

Browse files
authored
Revert "emscripten-3.1.58 (#72)"
This reverts commit c12cb4c.
1 parent b27943b commit 58c1530

11 files changed

+25
-199
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
emsdk_ver: ["3.1.58"]
23+
emsdk_ver: ["3.1.45"]
2424

2525
steps:
2626
- uses: actions/checkout@v2

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
emsdk_ver: ["3.1.58"]
23+
emsdk_ver: ["3.1.45"]
2424

2525
steps:
2626
- uses: actions/checkout@v2

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ if (NOT TARGET pybind11::headers)
101101
endif ()
102102

103103

104+
set(EM_FLAGS "${EM_FLAGS} -s WASM=1 --bind --pre-js pyjs_pre.js --post-js pyjs_post.js")
105+
104106
add_library(pyjs STATIC
105107
src/export_js_module.cpp
106108
src/export_js_proxy.cpp
@@ -119,12 +121,14 @@ target_link_libraries(pyjs PRIVATE ${PYTHON_UTIL_LIBS} pybind11::embed)
119121
target_compile_options(pyjs
120122
PUBLIC --std=c++17
121123
PUBLIC -Wno-deprecated
124+
PUBLIC "SHELL: --bind"
122125
PUBLIC "SHELL: -fexceptions"
123126
)
124127

125128
target_link_options(pyjs
126-
PUBLIC -lembind
129+
PUBLIC --bind
127130
PUBLIC -Wno-unused-command-line-argument
131+
PUBLIC "SHELL: --bind"
128132
PUBLIC "SHELL: -fexceptions"
129133
#PUBLIC "SHELL:-s EXPORT_EXCEPTION_HANDLING_HELPERS"
130134
#PUBLIC "SHELL:-s EXCEPTION_CATCHING_ALLOWED=['we only want to allow exception handling in side modules']"
@@ -191,6 +195,7 @@ target_link_libraries(pyjs_runtime_browser PRIVATE ${PYTHON_UTIL_LIBS} pybind11:
191195
target_compile_options(pyjs_runtime_browser
192196
PUBLIC --std=c++17
193197
PUBLIC -Wno-deprecated
198+
PUBLIC "SHELL: --bind"
194199
PUBLIC "SHELL: -s ENVIRONMENT=${ENVIRONMENT}"
195200
PUBLIC "SHELL: -fexceptions"
196201
#PUBLIC "SHELL:-s EXPORT_EXCEPTION_HANDLING_HELPERS"
@@ -201,7 +206,9 @@ target_compile_options(pyjs_runtime_browser
201206
)
202207

203208
target_link_options(pyjs_runtime_browser
209+
PUBLIC --bind
204210
PUBLIC -Wno-unused-command-line-argument
211+
PUBLIC "SHELL: --bind"
205212
PUBLIC "SHELL: -s MODULARIZE=1"
206213
PUBLIC "SHELL: -s EXPORT_NAME=\"createModule\""
207214
PUBLIC "SHELL: -s EXPORT_ES6=0"

build_mkdocs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
66
WASM_ENV_NAME=pyjs-wasm-dev
77
WASM_ENV_PREFIX=$MAMBA_ROOT_PREFIX/envs/$WASM_ENV_NAME
88
EMSDK_DIR=$THIS_DIR/emsdk_install
9-
EMSDK_VERSION="3.1.58"
9+
EMSDK_VERSION="3.1.45"
1010

1111

1212

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 137dae4dbdf9a192551582cdae827b085510956f Mon Sep 17 00:00:00 2001
1+
From 0170462a78e86de9ee95017bfa7e4a3dd620a375 Mon Sep 17 00:00:00 2001
22
From: Hood Chatham <roberthoodchatham@gmail.com>
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] Add back fs.findObject and fs.readFile in loadLibData
55

66
See upstream PR:
77
https://github.com/emscripten-core/emscripten/pull/19513
@@ -10,10 +10,10 @@ 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 aa90bea2b..1e67818a1 100644
13+
index d7676cdc2..f616d230d 100644
1414
--- a/src/library_dylink.js
1515
+++ b/src/library_dylink.js
16-
@@ -994,14 +994,23 @@ var LibraryDylink = {
16+
@@ -993,14 +993,23 @@ var LibraryDylink = {
1717
#endif
1818

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

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From e0cb884277200310eba263dcce5a7b1c4567bae6 Mon Sep 17 00:00:00 2001
1+
From a8bdb50a29062ee70c8667e4fd94dde47917f8fa Mon Sep 17 00:00:00 2001
22
From: Hood Chatham <roberthoodchatham@gmail.com>
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] Add useful error when symbol resolution fails
55

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

2121
diff --git a/src/library_dylink.js b/src/library_dylink.js
22-
index 1e67818a1..cea3ce05d 100644
22+
index d96e6b425..7f63b5c5e 100644
2323
--- a/src/library_dylink.js
2424
+++ b/src/library_dylink.js
25-
@@ -709,6 +709,9 @@ var LibraryDylink = {
25+
@@ -727,6 +727,9 @@ var LibraryDylink = {
2626
var resolved;
27-
stubs[prop] = (...args) => {
28-
resolved ||= resolveSymbol(prop);
27+
stubs[prop] = function() {
28+
if (!resolved) resolved = resolveSymbol(prop);
2929
+ if (!resolved) {
3030
+ throw new Error(`Dynamic linking error: cannot resolve symbol ${prop}`);
3131
+ }
32-
return resolved(...args);
32+
return resolved.apply(null, arguments);
3333
};
3434
}
3535
--
36-
2.34.1
36+
2.25.1
3737

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

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

emsdk/patches/0004-Upstream-PR-https-github.com-emscripten-core-emscrip.patch

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

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

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

emsdk/patches/0006-Load-dependent-libs-globally.patch

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

0 commit comments

Comments
 (0)