Skip to content

Commit

Permalink
bpo-40280: Allow to compile _testcapi as builtin module (GH-30559)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiran committed Jan 12, 2022
1 parent fc05e6b commit e34c936
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Modules/Setup.stdlib.in
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,10 @@
@MODULE__XXTESTFUZZ_TRUE@_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
@MODULE__TESTBUFFER_TRUE@_testbuffer _testbuffer.c
@MODULE__TESTINTERNALCAPI_TRUE@_testinternalcapi _testinternalcapi.c

@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c

# Some testing modules MUST be built as shared libraries.
*shared*
@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c
@MODULE__TESTIMPORTMULTIPLE_TRUE@_testimportmultiple _testimportmultiple.c
@MODULE__TESTMULTIPHASE_TRUE@_testmultiphase _testmultiphase.c
@MODULE__CTYPES_TEST_TRUE@_ctypes_test _ctypes/_ctypes_test.c
Expand Down
2 changes: 2 additions & 0 deletions Modules/_testcapimodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
macro defined, but only the public C API must be tested here. */

#undef Py_BUILD_CORE_MODULE
#undef Py_BUILD_CORE_BUILTIN

/* Always enable assertions */
#undef NDEBUG

Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -21258,8 +21258,8 @@ fi
if test "$enable_test_modules" = no; then
TEST_MODULES=no
else
case $ac_sys_system in #(
Emscripten) :
case $ac_sys_system/$ac_sys_emscripten_target in #(
Emscripten/browser) :
TEST_MODULES=no ;; #(
*) :
TEST_MODULES=yes
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6309,8 +6309,8 @@ AC_ARG_ENABLE(test-modules,
if test "$enable_test_modules" = no; then
TEST_MODULES=no
else
AS_CASE([$ac_sys_system],
[Emscripten], [TEST_MODULES=no],
AS_CASE([$ac_sys_system/$ac_sys_emscripten_target],
[Emscripten/browser], [TEST_MODULES=no],
[TEST_MODULES=yes]
)
fi
Expand Down

0 comments on commit e34c936

Please sign in to comment.