Skip to content

Commit b16ecb8

Browse files
authored
gh-108223: Add --disable-gil to configure (gh-108227)
The `--disable-gil` flags does not do anything yet other than define the Py_NOGIL macro. This is intended to support setting up additional buildbots.
1 parent 21c0844 commit b16ecb8

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

configure

+31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+15
Original file line numberDiff line numberDiff line change
@@ -7126,6 +7126,21 @@ AC_ARG_ENABLE([test-modules],
71267126
AC_MSG_RESULT([$TEST_MODULES])
71277127
AC_SUBST([TEST_MODULES])
71287128

7129+
# Check for --disable-gil
7130+
# --disable-gil
7131+
AC_MSG_CHECKING([for --disable-gil])
7132+
AC_ARG_ENABLE([gil],
7133+
[AS_HELP_STRING([--disable-gil], [enable experimental support for running without the GIL (default is no)])],
7134+
[AS_VAR_IF([enable_gil], [yes], [disable_gil=no], [disable_gil=yes])], [disable_gil=no]
7135+
)
7136+
AC_MSG_RESULT([$disable_gil])
7137+
7138+
if test "$disable_gil" = "yes"
7139+
then
7140+
AC_DEFINE([Py_NOGIL], [1],
7141+
[Define if you want to disable the GIL])
7142+
fi
7143+
71297144
AC_DEFUN([PY_STDLIB_MOD_SET_NA], [
71307145
m4_foreach([mod], [$@], [
71317146
AS_VAR_SET([py_cv_module_]mod, [n/a])])

pyconfig.h.in

+3
Original file line numberDiff line numberDiff line change
@@ -1609,6 +1609,9 @@
16091609
SipHash13: 3, externally defined: 0 */
16101610
#undef Py_HASH_ALGORITHM
16111611

1612+
/* Define if you want to disable the GIL */
1613+
#undef Py_NOGIL
1614+
16121615
/* Define if you want to enable internal statistics gathering. */
16131616
#undef Py_STATS
16141617

0 commit comments

Comments
 (0)