Update Emscripten to 3.1.18 (#2950)

This commit is contained in:
Hood Chatham 2022-08-21 17:17:49 -07:00 committed by GitHub
parent 26535e33cd
commit 67aa16861d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 33 additions and 180 deletions

View File

@ -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.15
export PYODIDE_EMSCRIPTEN_VERSION ?= 3.1.18
export PLATFORM_TRIPLET=wasm32-emscripten
export SYSCONFIG_NAME=_sysconfigdata__emscripten_$(PLATFORM_TRIPLET)

View File

@ -1,7 +1,7 @@
From 9e3b5aacb71deb2870ab589ca88aa126e1acc86a Mon Sep 17 00:00:00 2001
From 321c69e607de23e0f9e2ce12e0e849280d8338a9 Mon Sep 17 00:00:00 2001
From: Hood Chatham <roberthoodchatham@gmail.com>
Date: Mon, 28 Feb 2022 00:44:13 -0500
Subject: [PATCH 01/12] Patch in call trampolines to handle fpcast troubles
Subject: [PATCH 01/13] Patch in call trampolines to handle fpcast troubles
The wasm call_indirect instruction takes a function signature as an immediate
argument (an immediate argument is one which is determined statically at compile
@ -72,7 +72,7 @@ index 960c37e196..98861e8b87 100644
}
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 97669bef36..2a30c050a9 100644
index 97669bef36..34096aa7e1 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -172,6 +172,11 @@ member_get(PyMemberDescrObject *descr, PyObject *obj, PyObject *type)
@ -100,7 +100,7 @@ index 97669bef36..2a30c050a9 100644
return PyMember_SetOne((char *)obj, descr->d_member, value);
}
+EM_JS(PyObject*, setter_call_trampoline, (setter set, PyObject *obj, PyObject *value, void *closure), {
+EM_JS(int, setter_call_trampoline, (setter set, PyObject *obj, PyObject *value, void *closure), {
+ return wasmTable.get(set)(obj, value, closure);
+});
+

View File

@ -1,7 +1,7 @@
From fb49efa04e2ecf57c68c73e00538b2c13abea503 Mon Sep 17 00:00:00 2001
From 045da1c7c16376333685c90b48abd19307972da2 Mon Sep 17 00:00:00 2001
From: Michael Droettboom <mdboom@gmail.com>
Date: Mon, 28 Feb 2022 00:50:54 -0500
Subject: [PATCH 02/12] add emscripten host
Subject: [PATCH 02/13] add emscripten host
---
config.sub | 7 ++++++-

View File

@ -1,7 +1,7 @@
From 88529d19154fae757a58229e76c0fb849d279725 Mon Sep 17 00:00:00 2001
From 18d17c29f28ff61f9707ee150721d9452fa2e654 Mon Sep 17 00:00:00 2001
From: Roman Yurchak <rth.yurchak@gmail.com>
Date: Mon, 28 Feb 2022 00:53:53 -0500
Subject: [PATCH 03/12] fix Py_Sigset_Converter
Subject: [PATCH 03/13] fix Py_Sigset_Converter
---
Modules/posixmodule.c | 7 +++++++

View File

@ -1,7 +1,7 @@
From 17c0cf37fa3a23bed2dbe3c365b24c20e7e862f0 Mon Sep 17 00:00:00 2001
From 697ca6e1c24d817bb8cfb473a8da2fd670abf243 Mon Sep 17 00:00:00 2001
From: Michael Droettboom <mdboom@gmail.com>
Date: Mon, 28 Feb 2022 00:54:33 -0500
Subject: [PATCH 04/12] testing
Subject: [PATCH 04/13] testing
---
Lib/platform.py | 2 +-

View File

@ -1,7 +1,7 @@
From edfeabd42ac35f095a550e76084e4a549965f4ab Mon Sep 17 00:00:00 2001
From 5fffd52bf03abbade147f77a06f58b5a6736c255 Mon Sep 17 00:00:00 2001
From: ryanking13 <def6488@gmail.com>
Date: Wed, 6 Oct 2021 22:16:32 +0900
Subject: [PATCH 05/12] Drop pwd built-in module
Subject: [PATCH 05/13] Drop pwd built-in module
This patch drops pwd module support from Cpython.
pwd module provides access to the Unix user account and password database,

View File

@ -1,7 +1,7 @@
From bd962d077896fe6d89700baf2b822e71d514d7e9 Mon Sep 17 00:00:00 2001
From 02dae7ce1505a00dcd0e5a74ca07f584f5225c5a Mon Sep 17 00:00:00 2001
From: Hood <hood@mit.edu>
Date: Tue, 22 Jun 2021 20:12:45 -0700
Subject: [PATCH 06/12] Remove duplicate symbols from cfield.c
Subject: [PATCH 06/13] Remove duplicate symbols from cfield.c
These symbols are already defined by libffi.
---

View File

@ -1,7 +1,7 @@
From 5121186d3df60db190c474d983e3a26b818b79be Mon Sep 17 00:00:00 2001
From 9b255e03e2798b3ac235c8d191ed1de27aae1bdc Mon Sep 17 00:00:00 2001
From: Hood <hood@mit.edu>
Date: Thu, 24 Jun 2021 14:55:10 -0700
Subject: [PATCH 07/12] xfail core ctypes tests that don't work
Subject: [PATCH 07/13] xfail core ctypes tests that don't work
PyCode_SetExtra doesn't work and ctypes doesn't seem to work with variadic functions including PyUnicode_FromFormat/
---

View File

@ -1,7 +1,7 @@
From 9607846801566f921d23bff1ad19277e669d49cf Mon Sep 17 00:00:00 2001
From 504d76a1ce3b05dbc406d6e5998d9fa68a0ee6aa Mon Sep 17 00:00:00 2001
From: Hood Chatham <roberthoodchatham@gmail.com>
Date: Tue, 1 Mar 2022 17:06:53 -0800
Subject: [PATCH 08/12] Fix _PyImport_LoadDynamicModuleWithSpec fpcast
Subject: [PATCH 08/13] Fix _PyImport_LoadDynamicModuleWithSpec fpcast
---
Python/importdl.c | 11 ++++++++++-

View File

@ -1,7 +1,7 @@
From aa380e16f53db5868d300cee7a0a6a71557b0f63 Mon Sep 17 00:00:00 2001
From 9d0c813518fbdaa9963e46362608dd6d3e391799 Mon Sep 17 00:00:00 2001
From: Hood Chatham <roberthoodchatham@gmail.com>
Date: Mon, 2 May 2022 17:31:07 -0700
Subject: [PATCH 09/12] Add one more trampoline in cfunction_vectorcall_O
Subject: [PATCH 09/13] Add one more trampoline in cfunction_vectorcall_O
Christian already added this upstream in 3.11a7 so we can remove
this when we update to 3.11

View File

@ -1,7 +1,7 @@
From f0847509122fa24f7b4f28fd09057302c84c0b42 Mon Sep 17 00:00:00 2001
From 54d724f1227edfd0bf4198c52c3302f128063b5c Mon Sep 17 00:00:00 2001
From: Christian Heimes <christian@python.org>
Date: Tue, 8 Mar 2022 20:22:32 +0200
Subject: [PATCH 10/12] bpo-23325: Fix SIG_IGN and SIG_DFL int comparison in
Subject: [PATCH 10/13] bpo-23325: Fix SIG_IGN and SIG_DFL int comparison in
signal module (GH-31759)
---

View File

@ -1,7 +1,7 @@
From 580bb007ceb4b13f425395628b7a8e5989099a95 Mon Sep 17 00:00:00 2001
From 74dfc730d7a146b9d20ba7b3309aacf179016215 Mon Sep 17 00:00:00 2001
From: Hood Chatham <roberthoodchatham@gmail.com>
Date: Fri, 1 Apr 2022 18:55:11 -0700
Subject: [PATCH 11/12] bpo-47197: Fix void return type handling in ctypes
Subject: [PATCH 11/13] bpo-47197: Fix void return type handling in ctypes
_ctypes_get_ffi_type never returns ffi_type_void. If the
return type is specified as None, we need set the libffi

View File

@ -1,7 +1,7 @@
From 9eecc9ad836920f382db8e147d2b44df557787af Mon Sep 17 00:00:00 2001
From 8e20fedad850985b0789bc3aa06281e6b1ef9528 Mon Sep 17 00:00:00 2001
From: Hood Chatham <roberthoodchatham@gmail.com>
Date: Wed, 30 Mar 2022 14:50:30 -0700
Subject: [PATCH 12/12] Interrupt handling
Subject: [PATCH 12/13] Interrupt handling
---
Modules/signalmodule.c | 38 ++++++++++++++++++++++++++++++++++++++

View File

@ -14,8 +14,8 @@ substitutions:
## Unreleased
- {{ Enhancement }} Emscripten was updated to Version 3.1.15
{pr}`2958`
- {{ Enhancement }} Emscripten was updated to Version 3.1.18
{pr}`2958`, {pr}`2950`
- New packages: the standard library lzma module {pr}`2939`,
pycryptodomex {pr}`2966`, pycryptodome {pr}`2965`

View File

@ -1,150 +0,0 @@
From a4dc9406eaf4caf90bb577196d6616ad2bf0b6c5 Mon Sep 17 00:00:00 2001
From: John Wason <wason@wasontech.com>
Date: Sat, 18 Jun 2022 19:36:02 -0400
Subject: [PATCH 1/2] Add signatures to functions in library_eventloop.js
---
src/library_eventloop.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/library_eventloop.js b/src/library_eventloop.js
index f9d39ff7129..2f232900dcd 100644
--- a/src/library_eventloop.js
+++ b/src/library_eventloop.js
@@ -73,6 +73,7 @@ LibraryJSEventLoop = {
'$runtimeKeepalivePush', '$runtimeKeepalivePop',
#endif
],
+ emscripten_set_immediate__sig: 'iii',
emscripten_set_immediate: function(cb, userData) {
polyfillSetImmediate();
{{{ runtimeKeepalivePush(); }}}
@@ -89,6 +90,7 @@ LibraryJSEventLoop = {
'$runtimeKeepalivePop',
#endif
],
+ emscripten_clear_immediate__sig: 'vi',
emscripten_clear_immediate: function(id) {
{{{ runtimeKeepalivePop(); }}}
emClearImmediate(id);
@@ -99,6 +101,7 @@ LibraryJSEventLoop = {
'$runtimeKeepalivePush', '$runtimeKeepalivePop',
#endif
],
+ emscripten_set_immediate_loop__sig: 'vii' ,
emscripten_set_immediate_loop: function(cb, userData) {
polyfillSetImmediate();
function tick() {
@@ -119,6 +122,7 @@ LibraryJSEventLoop = {
'$runtimeKeepalivePush', '$runtimeKeepalivePop',
#endif
],
+ emscripten_set_timeout__sig: 'iidi',
emscripten_set_timeout: function(cb, msecs, userData) {
{{{ runtimeKeepalivePush() }}}
return setTimeout(function() {
@@ -129,6 +133,7 @@ LibraryJSEventLoop = {
}, msecs);
},
+ emscripten_clear_timeout__sig: 'vi',
emscripten_clear_timeout: function(id) {
clearTimeout(id);
},
@@ -138,6 +143,7 @@ LibraryJSEventLoop = {
'$runtimeKeepalivePush', '$runtimeKeepalivePop',
#endif
],
+ emscripten_set_timeout_loop__sig: 'vidi',
emscripten_set_timeout_loop: function(cb, msecs, userData) {
function tick() {
var t = performance.now();
@@ -162,6 +168,7 @@ LibraryJSEventLoop = {
'$runtimeKeepalivePush', '$runtimeKeepalivePop',
#endif
],
+ emscripten_set_interval__sig: 'iidi',
emscripten_set_interval: function(cb, msecs, userData) {
{{{ runtimeKeepalivePush() }}}
return setInterval(function() {
@@ -174,10 +181,11 @@ LibraryJSEventLoop = {
#if !MINIMAL_RUNTIME
emscripten_clear_interval__deps: ['$runtimeKeepalivePop'],
#endif
+ emscripten_clear_interval__sig: 'vi',
emscripten_clear_interval: function(id) {
{{{ runtimeKeepalivePop() }}}
clearInterval(id);
},
};
-mergeInto(LibraryManager.library, LibraryJSEventLoop);
+mergeInto(LibraryManager.library, LibraryJSEventLoop);
\ No newline at end of file
From aa4e361c57266b1b18c3035a73cc2075fadf2745 Mon Sep 17 00:00:00 2001
From: John Wason <wason@wasontech.com>
Date: Sat, 18 Jun 2022 20:37:35 -0400
Subject: [PATCH 2/2] Use "p" for pointers in signatures, and restore newline
at end of file
---
src/library_eventloop.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/library_eventloop.js b/src/library_eventloop.js
index 2f232900dcd..5cf835d9973 100644
--- a/src/library_eventloop.js
+++ b/src/library_eventloop.js
@@ -73,7 +73,7 @@ LibraryJSEventLoop = {
'$runtimeKeepalivePush', '$runtimeKeepalivePop',
#endif
],
- emscripten_set_immediate__sig: 'iii',
+ emscripten_set_immediate__sig: 'ipp',
emscripten_set_immediate: function(cb, userData) {
polyfillSetImmediate();
{{{ runtimeKeepalivePush(); }}}
@@ -101,7 +101,7 @@ LibraryJSEventLoop = {
'$runtimeKeepalivePush', '$runtimeKeepalivePop',
#endif
],
- emscripten_set_immediate_loop__sig: 'vii' ,
+ emscripten_set_immediate_loop__sig: 'vpp' ,
emscripten_set_immediate_loop: function(cb, userData) {
polyfillSetImmediate();
function tick() {
@@ -122,7 +122,7 @@ LibraryJSEventLoop = {
'$runtimeKeepalivePush', '$runtimeKeepalivePop',
#endif
],
- emscripten_set_timeout__sig: 'iidi',
+ emscripten_set_timeout__sig: 'ipdp',
emscripten_set_timeout: function(cb, msecs, userData) {
{{{ runtimeKeepalivePush() }}}
return setTimeout(function() {
@@ -143,7 +143,7 @@ LibraryJSEventLoop = {
'$runtimeKeepalivePush', '$runtimeKeepalivePop',
#endif
],
- emscripten_set_timeout_loop__sig: 'vidi',
+ emscripten_set_timeout_loop__sig: 'vpdp',
emscripten_set_timeout_loop: function(cb, msecs, userData) {
function tick() {
var t = performance.now();
@@ -168,7 +168,7 @@ LibraryJSEventLoop = {
'$runtimeKeepalivePush', '$runtimeKeepalivePop',
#endif
],
- emscripten_set_interval__sig: 'iidi',
+ emscripten_set_interval__sig: 'ipdp',
emscripten_set_interval: function(cb, msecs, userData) {
{{{ runtimeKeepalivePush() }}}
return setInterval(function() {
@@ -188,4 +188,4 @@ LibraryJSEventLoop = {
},
};
-mergeInto(LibraryManager.library, LibraryJSEventLoop);
\ No newline at end of file
+mergeInto(LibraryManager.library, LibraryJSEventLoop);

View File

@ -1,6 +1,7 @@
package:
name: RobotRaconteur
version: 0.15.1
_disabled: true
source:
url: https://github.com/robotraconteur/robotraconteur_pyodide/releases/download/v0.15.1-pyodide/RobotRaconteur-pyodide-0.15.1-post1-Source.tar.gz

View File

@ -24,7 +24,7 @@ build:
grep -rl "void BLAS" . | xargs sed -i 's/void BLAS/int BLAS/g'
emmake make -j ${PYODIDE_JOBS:-3} install \
LDFLAGS="-sSIDE_MODULE=1 -L${WASM_LIBRARY_DIR}/lib " \
LDFLAGS="${SIDE_MODULE_LDFLAGS} -L${WASM_LIBRARY_DIR}/lib " \
BLAS="$PYODIDE_ROOT/packages/CLAPACK/dist/clapack_all.so" \
LAPACK="$PYODIDE_ROOT/packages/CLAPACK/dist/clapack_all.so" \
INSTALL=${WASM_LIBRARY_DIR}

View File

@ -16,6 +16,8 @@ def _strip_assertions_stderr(messages: Sequence[str]) -> list[str]:
if msg.strip() in [
"sigaction: signal type not supported: this is a no-op.",
"Calling stub instead of siginterrupt()",
"warning: no blob constructor, cannot create blobs with mimetypes",
"warning: no BlobBuilder",
]:
continue
res.append(msg)