Skip to content

Disable building test modules that require dlopen() under WASI SDK 21 #115983

Closed
@brettcannon

Description

@brettcannon

_testimportmultiple, _testmultiphase, _testsinglephase, xxlimited, xxlimited_35 all get built under WASI SDK 21 thanks to dlopen(), but since that function doesn't work normally under WASI we should skip building them.

cpython/configure.ac

Lines 7582 to 7593 in 6087315

PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes])
PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes])
PY_STDLIB_MOD([xxsubtype], [test "$TEST_MODULES" = yes])
PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes])
PY_STDLIB_MOD([_ctypes_test],
[test "$TEST_MODULES" = yes], [test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes],
[], [$LIBM])
dnl Limited API template modules.
dnl Emscripten does not support shared libraries yet.
PY_STDLIB_MOD([xxlimited], [], [test "$ac_cv_func_dlopen" = yes])
PY_STDLIB_MOD([xxlimited_35], [], [test "$ac_cv_func_dlopen" = yes])

We could either update Tools/wasm/wasi.py to disable test modules, update configure.ac so they don't get compiled under WASI, or see if we can get them compiled in statically.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-wasibuildThe build process and cross-build

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions