Skip to content

Commit ed051a7

Browse files
authored
Require mimalloc explicitly on all GNU Python 3.13 builds (#391)
Previously, it was only explicitly required for the freethreaded builds Closes #389
1 parent 6a58ae1 commit ed051a7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cpython-unix/build-cpython.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,14 @@ if [ -n "${CPYTHON_DEBUG}" ]; then
364364
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-pydebug"
365365
fi
366366

367+
# Explicitly enable mimalloc on 3.13+, it's already included by default but with this it'll fail
368+
# if it's missing from the system. The MUSL builds do not supprt mimalloc yet.
369+
if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" && "${CC}" != "musl-clang" ]]; then
370+
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-mimalloc"
371+
fi
372+
367373
if [ -n "${CPYTHON_FREETHREADED}" ]; then
368-
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --disable-gil --with-mimalloc"
374+
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --disable-gil"
369375
fi
370376

371377
if [ -n "${CPYTHON_OPTIMIZED}" ]; then

0 commit comments

Comments
 (0)