Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Tools/wasm/config.site-wasm32-wasi
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# config.site override for cross compiling to wasm32-wasi platform
#
# Written by Christian Heimes <christian@python.org>
# Partly based on pyodide's pyconfig.undefs.h file.


# cannot be detected in cross builds
ac_cv_buggy_getaddrinfo=no
Expand All @@ -14,4 +12,8 @@ ac_cv_file__dev_ptc=no
# dummy readelf, WASI build does not need readelf.
ac_cv_prog_ac_ct_READELF=true

# get/setrlimit are not supported
ac_cv_header_sys_resource_h=no

# undefined symbols / unsupported features
ac_cv_func_eventfd=no
32 changes: 31 additions & 1 deletion configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,9 @@ AS_CASE([$ac_sys_system/$ac_sys_emscripten_target],
],
[WASI/*], [
AC_DEFINE([_WASI_EMULATED_SIGNAL], [1], [Define to 1 if you want to emulate signals on WASI])
LIBS="$LIBS -lwasi-emulated-signal"
AC_DEFINE([_WASI_EMULATED_GETPID], [1], [Define to 1 if you want to emulate getpid() on WASI])
AC_DEFINE([_WASI_EMULATED_PROCESS_CLOCKS], [1], [Define to 1 if you want to emulate process clocks on WASI])
LIBS="$LIBS -lwasi-emulated-signal -lwasi-emulated-getpid -lwasi-emulated-process-clocks"
echo "#define _WASI_EMULATED_SIGNAL 1" >> confdefs.h
]
)
Expand Down Expand Up @@ -6078,6 +6080,7 @@ AC_ARG_WITH(ensurepip,
[
AS_CASE([$ac_sys_system],
[Emscripten], [with_ensurepip=no],
[WASI], [with_ensurepip=no],
[with_ensurepip=upgrade]
)
])
Expand Down Expand Up @@ -6468,6 +6471,25 @@ AS_CASE([$ac_sys_system/$ac_sys_emscripten_target],
[syslog],
)
],
[WASI/*], [
PY_STDLIB_MOD_SET_NA(
[_ctypes],
[_ctypes_test],
[_curses],
[_curses_panel],
[_dbm],
[_gdbm],
[_scproxy],
[_tkinter],
[_xxsubinterpreters],
[grp],
[nis],
[ossaudiodev],
[pwd],
[spwd],
[syslog],
)
],
[PY_STDLIB_MOD_SET_NA([_scproxy])]
)

Expand Down
6 changes: 6 additions & 0 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1728,6 +1728,12 @@
/* Define to force use of thread-safe errno, h_errno, and other functions */
#undef _REENTRANT

/* Define to 1 if you want to emulate getpid() on WASI */
#undef _WASI_EMULATED_GETPID

/* Define to 1 if you want to emulate process clocks on WASI */
#undef _WASI_EMULATED_PROCESS_CLOCKS

/* Define to 1 if you want to emulate signals on WASI */
#undef _WASI_EMULATED_SIGNAL

Expand Down