https://github.com/python/cpython/commit/6d803acbb140ff80038b9a14969c3af29687e7a3
commit: 6d803acbb140ff80038b9a14969c3af29687e7a3
branch: main
author: Hood Chatham <[email protected]>
committer: freakboy3742 <[email protected]>
date: 2026-10-22T14:10:31-07:00
summary:

gh-160161 Fix node_entry.mjs with newest versions of Emscripten (#160264)

Applies an upstream-recommended workaround to work around the
removal of ``FS.filesystems``.

files:
M Platforms/emscripten/node_entry.mjs
M configure
M configure.ac

diff --git a/Platforms/emscripten/node_entry.mjs 
b/Platforms/emscripten/node_entry.mjs
index 9e790583f5eb9f..a8faccbdd29ca3 100644
--- a/Platforms/emscripten/node_entry.mjs
+++ b/Platforms/emscripten/node_entry.mjs
@@ -22,7 +22,7 @@ function rootDirsToMount(Module) {
 function mountDirectories(Module) {
   for (const dir of rootDirsToMount(Module)) {
     Module.FS.mkdirTree(dir);
-    Module.FS.mount(Module.FS.filesystems.NODEFS, { root: dir }, dir);
+    Module.FS.mount(Module.NODEFS, { root: dir }, dir);
   }
 }
 
diff --git a/configure b/configure
index 81af3fa0402a20..c5b45796563411 100755
--- a/configure
+++ b/configure
@@ -9984,7 +9984,7 @@ fi
 
         as_fn_append LINKFORSHARED " -sFORCE_FILESYSTEM -lidbfs.js -lnodefs.js 
-lproxyfs.js -lworkerfs.js"
     as_fn_append LINKFORSHARED " 
-sEXPORTED_RUNTIME_METHODS=FS,callMain,ENV,HEAPU32,TTY,ERRNO_CODES"
-    as_fn_append LINKFORSHARED " 
-sEXPORTED_FUNCTIONS=_main,_Py_Version,_PyGILState_GetThisThreadState"
+    as_fn_append LINKFORSHARED " 
-sEXPORTED_FUNCTIONS=_main,_Py_Version,_PyGILState_GetThisThreadState,NODEFS"
     as_fn_append LINKFORSHARED " -sSTACK_SIZE=5MB"
         as_fn_append LINKFORSHARED " -sTEXTDECODER=2"
 
diff --git a/configure.ac b/configure.ac
index a55276ed5e6e8f..8c7d3b4e617fe9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2449,7 +2449,7 @@ AS_CASE([$ac_sys_system],
     dnl Include file system support
     AS_VAR_APPEND([LINKFORSHARED], [" -sFORCE_FILESYSTEM -lidbfs.js 
-lnodefs.js -lproxyfs.js -lworkerfs.js"])
     AS_VAR_APPEND([LINKFORSHARED], [" 
-sEXPORTED_RUNTIME_METHODS=FS,callMain,ENV,HEAPU32,TTY,ERRNO_CODES"])
-    AS_VAR_APPEND([LINKFORSHARED], [" 
-sEXPORTED_FUNCTIONS=_main,_Py_Version,_PyGILState_GetThisThreadState"])
+    AS_VAR_APPEND([LINKFORSHARED], [" 
-sEXPORTED_FUNCTIONS=_main,_Py_Version,_PyGILState_GetThisThreadState,NODEFS"])
     AS_VAR_APPEND([LINKFORSHARED], [" -sSTACK_SIZE=5MB"])
     dnl Avoid bugs in JS fallback string decoding path
     AS_VAR_APPEND([LINKFORSHARED], [" -sTEXTDECODER=2"])

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to