Skip to content

Commit

Permalink
Revert "emscripten-3.1.58 (#72)"
Browse files Browse the repository at this point in the history
This reverts commit c12cb4c.
  • Loading branch information
martinRenou authored Oct 22, 2024
1 parent b27943b commit 58c1530
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 199 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
emsdk_ver: ["3.1.58"]
emsdk_ver: ["3.1.45"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
emsdk_ver: ["3.1.58"]
emsdk_ver: ["3.1.45"]

steps:
- uses: actions/checkout@v2
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ if (NOT TARGET pybind11::headers)
endif ()


set(EM_FLAGS "${EM_FLAGS} -s WASM=1 --bind --pre-js pyjs_pre.js --post-js pyjs_post.js")

add_library(pyjs STATIC
src/export_js_module.cpp
src/export_js_proxy.cpp
Expand All @@ -119,12 +121,14 @@ target_link_libraries(pyjs PRIVATE ${PYTHON_UTIL_LIBS} pybind11::embed)
target_compile_options(pyjs
PUBLIC --std=c++17
PUBLIC -Wno-deprecated
PUBLIC "SHELL: --bind"
PUBLIC "SHELL: -fexceptions"
)

target_link_options(pyjs
PUBLIC -lembind
PUBLIC --bind
PUBLIC -Wno-unused-command-line-argument
PUBLIC "SHELL: --bind"
PUBLIC "SHELL: -fexceptions"
#PUBLIC "SHELL:-s EXPORT_EXCEPTION_HANDLING_HELPERS"
#PUBLIC "SHELL:-s EXCEPTION_CATCHING_ALLOWED=['we only want to allow exception handling in side modules']"
Expand Down Expand Up @@ -191,6 +195,7 @@ target_link_libraries(pyjs_runtime_browser PRIVATE ${PYTHON_UTIL_LIBS} pybind11:
target_compile_options(pyjs_runtime_browser
PUBLIC --std=c++17
PUBLIC -Wno-deprecated
PUBLIC "SHELL: --bind"
PUBLIC "SHELL: -s ENVIRONMENT=${ENVIRONMENT}"
PUBLIC "SHELL: -fexceptions"
#PUBLIC "SHELL:-s EXPORT_EXCEPTION_HANDLING_HELPERS"
Expand All @@ -201,7 +206,9 @@ target_compile_options(pyjs_runtime_browser
)

target_link_options(pyjs_runtime_browser
PUBLIC --bind
PUBLIC -Wno-unused-command-line-argument
PUBLIC "SHELL: --bind"
PUBLIC "SHELL: -s MODULARIZE=1"
PUBLIC "SHELL: -s EXPORT_NAME=\"createModule\""
PUBLIC "SHELL: -s EXPORT_ES6=0"
Expand Down
2 changes: 1 addition & 1 deletion build_mkdocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
WASM_ENV_NAME=pyjs-wasm-dev
WASM_ENV_PREFIX=$MAMBA_ROOT_PREFIX/envs/$WASM_ENV_NAME
EMSDK_DIR=$THIS_DIR/emsdk_install
EMSDK_VERSION="3.1.58"
EMSDK_VERSION="3.1.45"



Expand Down
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 <roberthoodchatham@gmail.com>
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 <roberthoodchatham@gmail.com>
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

87 changes: 0 additions & 87 deletions emsdk/patches/0003-Changes-for-JSPI.patch

This file was deleted.

This file was deleted.

31 changes: 0 additions & 31 deletions emsdk/patches/0005-Raise-when-no-argument-is-given.patch

This file was deleted.

35 changes: 0 additions & 35 deletions emsdk/patches/0006-Load-dependent-libs-globally.patch

This file was deleted.

2 changes: 1 addition & 1 deletion src/js_timestamp.cpp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define PYJS_JS_UTC_TIMESTAMP "2024-08-01 08:54:38.482179"
#define PYJS_JS_UTC_TIMESTAMP "2024-03-19 09:56:38.004136"

0 comments on commit 58c1530

Please sign in to comment.