summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-01-14 11:11:49 (GMT)
committerGitHub <noreply@github.com>2022-01-14 11:11:49 (GMT)
commitc8319f7921fbcb0dea04da48a1b04a5d0d21ae1c (patch)
tree4a03d7cb48a30939cff06204118f9d4329859448 /configure.ac
parent7c770d3350813a82a639fcb3babae0de2b87aaae (diff)
downloadcpython-c8319f7921fbcb0dea04da48a1b04a5d0d21ae1c.zip
cpython-c8319f7921fbcb0dea04da48a1b04a5d0d21ae1c.tar.gz
cpython-c8319f7921fbcb0dea04da48a1b04a5d0d21ae1c.tar.bz2
bpo-40280: Build WASM stdlib bundle and more modules for node (GH-30597)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac44
1 files changed, 32 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 89041b2..300d793 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1354,7 +1354,10 @@ fi
AC_MSG_RESULT($LDLIBRARY)
# LIBRARY_DEPS, LINK_PYTHON_OBJS and LINK_PYTHON_DEPS variable
-LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
+AS_CASE([$ac_sys_system/$ac_sys_emscripten_target],
+ [Emscripten/browser], [LIBRARY_DEPS='$(PY3LIBRARY) $(WASM_STDLIB)'],
+ [LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)']
+)
LINK_PYTHON_DEPS='$(LIBRARY_DEPS)'
if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
@@ -1839,13 +1842,13 @@ fi
# WASM flags
AS_CASE([$ac_sys_system/$ac_sys_emscripten_target],
[Emscripten/browser], [
- LDFLAGS_NODIST="$(LDFLAGS_NODIST) -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1 --preload-file \$(WASM_ASSETS_DIR)"
+ LDFLAGS_NODIST="$LDFLAGS_NODIST -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1 --preload-file \$(WASM_ASSETS_DIR)"
WASM_ASSETS_DIR=".\$(prefix)"
WASM_STDLIB="\$(WASM_ASSETS_DIR)/local/lib/python\$(VERSION)/os.py"
],
[Emscripten/node], [
- LDFLAGS_NODIST="$(LDFLAGS_NODIST) -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1 -s NODERAWFS=1 -s EXIT_RUNTIME=1 -s USE_PTHREADS -s PROXY_TO_PTHREAD"
- CFLAGS_NODIST="$(CFLAGS_NODIST) -pthread"
+ LDFLAGS_NODIST="$LDFLAGS_NODIST -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1 -s NODERAWFS=1 -s EXIT_RUNTIME=1 -s USE_PTHREADS -s PROXY_TO_PTHREAD"
+ CFLAGS_NODIST="$CFLAGS_NODIST -pthread"
],
[WASI], [
AC_DEFINE([_WASI_EMULATED_SIGNAL], [1], [Define to 1 if you want to emulate signals on WASI])
@@ -6336,14 +6339,14 @@ AC_SUBST(TEST_MODULES)
dnl Modules that are not available on some platforms
dnl AIX has shadow passwords, but access is not via getspent()
dnl VxWorks does not provide crypt() function
-AS_CASE([$ac_sys_system],
- [AIX], [py_stdlib_not_available="_scproxy spwd"],
- [VxWorks*], [py_stdlib_not_available="_scproxy _crypt termios grp"],
- [Darwin], [py_stdlib_not_available="ossaudiodev spwd"],
- [CYGWIN*], [py_stdlib_not_available="_scproxy nis"],
- [QNX*], [py_stdlib_not_available="_scproxy nis"],
- [FreeBSD*], [py_stdlib_not_available="_scproxy spwd"],
- [Emscripten], [
+AS_CASE([$ac_sys_system/$ac_sys_emscripten_target],
+ [AIX/*], [py_stdlib_not_available="_scproxy spwd"],
+ [VxWorks*/*], [py_stdlib_not_available="_scproxy _crypt termios grp"],
+ [Darwin/*], [py_stdlib_not_available="ossaudiodev spwd"],
+ [CYGWIN*/*], [py_stdlib_not_available="_scproxy nis"],
+ [QNX*/*], [py_stdlib_not_available="_scproxy nis"],
+ [FreeBSD*/*], [py_stdlib_not_available="_scproxy spwd"],
+ [Emscripten/browser], [
py_stdlib_not_available="m4_normalize([
_ctypes
_curses
@@ -6367,6 +6370,23 @@ AS_CASE([$ac_sys_system],
termios
])"
],
+ dnl Some modules like _posixsubprocess do not work. We build them anyway
+ dnl so imports in tests do not fail.
+ [Emscripten/node], [
+ py_stdlib_not_available="m4_normalize([
+ _ctypes
+ _curses
+ _curses_panel
+ _dbm
+ _gdbm
+ _scproxy
+ _tkinter
+ nis
+ ossaudiodev
+ spwd
+ syslog
+ ])"
+ ],
[py_stdlib_not_available="_scproxy"]
)