From 3dfe5b35ef1851f5aa96319e898420d95908275b Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Mon, 7 Nov 2022 08:51:24 -0800 Subject: [PATCH] Emscripten 3.1.23 (#3148) --- Makefile.envs | 5 +- docs/project/changelog.md | 4 +- ...ain-file-if-CMAKE_TOOLCHAIN_FILE-env.patch | 33 ---------- .../0002-library-eventloop-signatures.patch | 64 ------------------- pyodide-build/pyodide_build/buildall.py | 15 ++--- 5 files changed, 10 insertions(+), 111 deletions(-) delete mode 100644 emsdk/patches/0001-Don-t-set-toolchain-file-if-CMAKE_TOOLCHAIN_FILE-env.patch delete mode 100644 emsdk/patches/0002-library-eventloop-signatures.patch diff --git a/Makefile.envs b/Makefile.envs index fb2b97591..5a6fc55b0 100644 --- a/Makefile.envs +++ b/Makefile.envs @@ -1,7 +1,7 @@ export PYVERSION ?= 3.10.2 # Note: when updating EMSCRIPTEN_VERSION make sure to update # the version number in the "uname" patch. -export PYODIDE_EMSCRIPTEN_VERSION ?= 3.1.21 +export PYODIDE_EMSCRIPTEN_VERSION ?= 3.1.23 export PLATFORM_TRIPLET=wasm32-emscripten export SYSCONFIG_NAME=_sysconfigdata__emscripten_$(PLATFORM_TRIPLET) @@ -98,7 +98,8 @@ export LDFLAGS_BASE=\ -s WASM_BIGINT \ $(EXTRA_LDFLAGS) -export CXXFLAGS_BASE= +export CXXFLAGS_BASE=\ + -std=c++14 export SIDE_MODULE_LDFLAGS= $(LDFLAGS_BASE) -s SIDE_MODULE=1 export MAIN_MODULE_LDFLAGS= $(LDFLAGS_BASE) \ diff --git a/docs/project/changelog.md b/docs/project/changelog.md index 7825e7ef4..30350c4f4 100644 --- a/docs/project/changelog.md +++ b/docs/project/changelog.md @@ -27,8 +27,8 @@ substitutions: module-type service workers. {pr}`3070` -- {{ Enhancement }} Emscripten was updated to Version 3.1.21 - {pr}`2958`, {pr}`2950`, {pr}`3027`, {pr}`3107` +- {{ Enhancement }} Emscripten was updated to Version 3.1.23 + {pr}`2958`, {pr}`2950`, {pr}`3027`, {pr}`3107`, {pr}`3148` - {{ Enhancement }} Added a new API {any}`pyodide.mountNativeFS` which mounts [FileSystemDirectoryHandle](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle) diff --git a/emsdk/patches/0001-Don-t-set-toolchain-file-if-CMAKE_TOOLCHAIN_FILE-env.patch b/emsdk/patches/0001-Don-t-set-toolchain-file-if-CMAKE_TOOLCHAIN_FILE-env.patch deleted file mode 100644 index e119ec7f1..000000000 --- a/emsdk/patches/0001-Don-t-set-toolchain-file-if-CMAKE_TOOLCHAIN_FILE-env.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a04edfb157cd8bd4f07abc9bafa9cb0e8c51e4d8 Mon Sep 17 00:00:00 2001 -From: Gyeongjae Choi -Date: Tue, 30 Aug 2022 05:57:51 +0000 -Subject: [PATCH] Don't set toolchain file if CMAKE_TOOLCHAIN_FILE env variable - is specified - ---- - emcmake.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/emcmake.py b/emcmake.py -index b16f565c1..e7887f8f5 100755 ---- a/emcmake.py -+++ b/emcmake.py -@@ -4,6 +4,7 @@ - # University of Illinois/NCSA Open Source License. Both these licenses can be - # found in the LICENSE file. - -+import os - import sys - from tools import shared - from tools import config -@@ -30,7 +31,7 @@ variables so that emcc etc. are used. Typical usage: - return any(substr in s for s in args) - - # Append the Emscripten toolchain file if the user didn't specify one. -- if not has_substr(args, '-DCMAKE_TOOLCHAIN_FILE'): -+ if not has_substr(args, '-DCMAKE_TOOLCHAIN_FILE') and not os.environ.get("CMAKE_TOOLCHAIN_FILE"): - args.append('-DCMAKE_TOOLCHAIN_FILE=' + utils.path_from_root('cmake/Modules/Platform/Emscripten.cmake')) - - if not has_substr(args, '-DCMAKE_CROSSCOMPILING_EMULATOR'): --- -2.37.1 diff --git a/emsdk/patches/0002-library-eventloop-signatures.patch b/emsdk/patches/0002-library-eventloop-signatures.patch deleted file mode 100644 index 7382222e2..000000000 --- a/emsdk/patches/0002-library-eventloop-signatures.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/src/library_eventloop.js b/src/library_eventloop.js -index a8f9c3c18..77b357f0f 100644 ---- a/src/library_eventloop.js -+++ b/src/library_eventloop.js -@@ -70,6 +70,7 @@ LibraryJSEventLoop = { - // emscripten_set_immediate_loop() if application links to both of them. - }, - -+ emscripten_set_immediate__sig: 'ipp', - emscripten_set_immediate__deps: ['$polyfillSetImmediate', '$callUserCallback'], - emscripten_set_immediate: function(cb, userData) { - polyfillSetImmediate(); -@@ -82,12 +83,14 @@ LibraryJSEventLoop = { - }); - }, - -+ emscripten_clear_immediate__sig: 'vi', - emscripten_clear_immediate__deps: ['$polyfillSetImmediate'], - emscripten_clear_immediate: function(id) { - {{{ runtimeKeepalivePop(); }}} - emClearImmediate(id); - }, - -+ emscripten_set_immediate_loop__sig: 'vpp' , - emscripten_set_immediate_loop__deps: ['$polyfillSetImmediate', '$callUserCallback'], - emscripten_set_immediate_loop: function(cb, userData) { - polyfillSetImmediate(); -@@ -104,6 +107,7 @@ LibraryJSEventLoop = { - return emSetImmediate(tick); - }, - -+ emscripten_set_timeout__sig: 'ipdp', - emscripten_set_timeout__deps: ['$callUserCallback'], - emscripten_set_timeout: function(cb, msecs, userData) { - {{{ runtimeKeepalivePush() }}} -@@ -115,10 +119,12 @@ LibraryJSEventLoop = { - }, msecs); - }, - -+ emscripten_clear_timeout__sig: 'vi', - emscripten_clear_timeout: function(id) { - clearTimeout(id); - }, - -+ emscripten_set_timeout_loop__sig: 'vpdp', - emscripten_set_timeout_loop__deps: ['$callUserCallback'], - emscripten_set_timeout_loop: function(cb, msecs, userData) { - function tick() { -@@ -139,6 +145,7 @@ LibraryJSEventLoop = { - return setTimeout(tick, 0); - }, - -+ emscripten_set_interval__sig: 'ipdp', - emscripten_set_interval__deps: ['$callUserCallback'], - emscripten_set_interval: function(cb, msecs, userData) { - {{{ runtimeKeepalivePush() }}} -@@ -149,6 +156,7 @@ LibraryJSEventLoop = { - }, msecs); - }, - -+ emscripten_clear_interval__sig: 'vi', - emscripten_clear_interval: function(id) { - {{{ runtimeKeepalivePop() }}} - clearInterval(id); diff --git a/pyodide-build/pyodide_build/buildall.py b/pyodide-build/pyodide_build/buildall.py index edaf7664d..4ae715fc3 100755 --- a/pyodide-build/pyodide_build/buildall.py +++ b/pyodide-build/pyodide_build/buildall.py @@ -133,16 +133,11 @@ class Package(BasePackage): "pyodide_build", "buildpkg", str(self.pkgdir / "meta.yaml"), - "--cflags", - args.cflags, - "--cxxflags", - args.cxxflags, - "--ldflags", - args.ldflags, - "--target-install-dir", - args.target_install_dir, - "--host-install-dir", - args.host_install_dir, + f"--cflags={args.cflags}", + f"--cxxflags={args.cxxflags}", + f"--ldflags={args.ldflags}", + f"--target-install-dir={args.target_install_dir}", + f"--host-install-dir={args.host_install_dir}", # Either this package has been updated and this doesn't # matter, or this package is dependent on a package that has # been updated and should be rebuilt even though its own