This file documents how ./configure is invoked across CPython's GitHub Actions
CI workflows, to ensure the Python-based configure.py supports all required
options.
Each item tracks whether configure.py correctly handles that flag or scenario.
-
--with-pydebug— enable debug build (Py_DEBUG) -
--disable-gil— free-threading build (no GIL) -
--enable-shared— build shared library -
--without-pymalloc— disable pymalloc allocator
-
--enable-safety— enable safety checks -
--enable-slower-safety— enable slower safety checks -
--enable-bolt— enable BOLT binary optimization -
--config-cache— read/writeconfig.cacheto speed up re-runs
-
--enable-experimental-jit— enable the JIT compiler -
--enable-experimental-jit=interpreter— JIT interpreter-only mode -
--with-tail-call-interp— enable tail-call interpreter
-
--prefix=PATH— installation prefix -
--with-build-python=PATH— build-system Python for cross-compilation (needs two-stage build) -
--enable-universalsdk— build macOS universal binary (macOS only) -
--with-universal-archs=universal2— macOS arm64+x86_64 universal binary (macOS only)
-
--with-openssl=PATH— path to OpenSSL installation -
--with-builtin-hashlib-hashes=blake2— build blake2 into hashlib -
--with-ssl-default-suites=openssl— use OpenSSL default cipher suites
-
--with-address-sanitizer— enable AddressSanitizer -
--with-thread-sanitizer— enable ThreadSanitizer -
--with-undefined-behavior-sanitizer— enable UBSan
-
CC=clang-N— custom compiler (tail-call.yml, jit.yml) -
CFLAGS="..."— extra compiler flags (e.g.-fdiagnostics-format=json) -
MACOSX_DEPLOYMENT_TARGET=10.15— macOS min deployment target (macOS only) -
GDBM_CFLAGS,GDBM_LIBS— GDBM library paths (macOS only) -
PROFILE_TASK=...— PGO task override (reusable-ubuntu.yml)
- In-tree build:
./configure [flags] - Out-of-tree build: invoke as
../srcdir/configurefrom a build directory - WASI wrapper passthrough:
python3 Platforms/WASI configure-build-python -- --config-cache --with-pydebug(needs WASI SDK)
Platforms: ubuntu-24.04, ubuntu-24.04-arm, macos-14, macos-15-intel, android, ios, wasi
# check-generated-files
./configure --config-cache --with-pydebug --enable-shared
# build-ubuntu-ssltests-openssl
./configure CFLAGS="-fdiagnostics-format=json" \
--config-cache --enable-slower-safety --with-pydebug \
--with-openssl="$OPENSSL_DIR"
# build-ubuntu-ssltests-awslc
./configure CFLAGS="-fdiagnostics-format=json" \
--config-cache --enable-slower-safety --with-pydebug \
--with-openssl="$OPENSSL_DIR" \
--with-builtin-hashlib-hashes=blake2 \
--with-ssl-default-suites=openssl
# test-hypothesis (out-of-tree build from $BUILD_DIR)
../cpython-ro-srcdir/configure \
--config-cache --with-pydebug --enable-slower-safety \
--with-openssl="$OPENSSL_DIR"
# build-asan
./configure --config-cache --with-address-sanitizer --without-pymalloc
# cross-build-linux (build host python, then cross-compile)
./configure --prefix="$BUILD_DIR/host-python"
./configure --prefix="$BUILD_DIR/cross-python" \
--with-build-python="$BUILD_DIR/host-python/bin/python3"Platforms: ubuntu-24.04, ubuntu-24.04-arm, macos-14, macos-15-intel, windows-2022, windows-11-arm
# interpreter job
./configure --enable-experimental-jit=interpreter --with-pydebug
# jit - Linux (--with-pydebug conditional on debug matrix var)
./configure --enable-experimental-jit [--with-pydebug]
# jit - macOS
./configure --enable-experimental-jit \
--enable-universalsdk --with-universal-archs=universal2 [--with-pydebug]
# jit-with-disabled-gil
./configure --enable-experimental-jit --with-pydebug --disable-gil
# tail-call-jit (with explicit compiler)
CC=clang-$LLVM ./configure --enable-experimental-jit \
--with-tail-call-interp --with-pydebugPlatforms: ubuntu-24.04
./configure --with-pydebugPlatforms: macos-14, macos-15-intel
Environment: MACOSX_DEPLOYMENT_TARGET=10.15, GDBM_CFLAGS, GDBM_LIBS
./configure \
--config-cache \
--with-pydebug \
--enable-slower-safety \
--enable-safety \
[--disable-gil] \
--prefix=/opt/python-dev \
--with-openssl="$(brew --prefix openssl@3.0)"Platforms: ubuntu-24.04
./configure \
--config-cache \
--with-pydebug \
[--with-thread-sanitizer | --with-undefined-behavior-sanitizer] \
[--disable-gil]Platforms: ubuntu-24.04, ubuntu-24.04-arm (out-of-tree build)
Environment: PROFILE_TASK='-m test --pgo --ignore test_unpickle_module_race'
../cpython-ro-srcdir/configure \
--config-cache \
--with-pydebug \
--enable-slower-safety \
--enable-safety \
--with-openssl="$OPENSSL_DIR" \
[--disable-gil] \
[--enable-bolt]Platforms: ubuntu-24.04-arm
Uses a Python wrapper rather than calling ./configure directly:
python3 Platforms/WASI configure-build-python -- --config-cache --with-pydebug
python3 Platforms/WASI configure-host -- --config-cachePlatforms: ubuntu-24.04, ubuntu-24.04-arm, macos-14, macos-15-intel, windows-2022, windows-2025-vs2026, windows-11-arm
# Linux
CC=clang-20 ./configure --with-tail-call-interp --with-pydebug
# Linux free-threading
CC=clang-20 ./configure --with-tail-call-interp --disable-gil
# macOS
CC=clang-20 ./configure --with-tail-call-interp-
Out-of-tree builds:
configureis invoked from a separate build directory with the source path as../cpython-ro-srcdir/configure. Thesrcdirmust be correctly detected as distinct from the current directory. -
Environment variable passthrough:
CC,CFLAGS, and library-path variables (GDBM_CFLAGS,GDBM_LIBS) must be accepted and propagated into the build. -
--config-cache: Used extensively; must read/writeconfig.cacheto speed up repeated configure runs. -
Conditional flags:
--disable-gil,--with-pydebug, etc. are passed conditionally based on matrix variables — all must be accepted gracefully. -
WASI: Uses a wrapper script, not
./configuredirectly. The wrapper passes--config-cacheand--with-pydebugthrough, so those flags must work when configure is invoked as a sub-step. -
Windows: JIT and tail-call workflows include Windows runners, but configure on Windows uses PCbuild/MSBuild — no
./configurecall is made.