Skip to content

Commit f356d4f

Browse files
committed
Use mimalloc on all Python 3.13 builds
Previously, it was only used for the freethreaded builds
1 parent e8b031b commit f356d4f

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
@@ -355,8 +355,14 @@ if [ -n "${CPYTHON_DEBUG}" ]; then
355355
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-pydebug"
356356
fi
357357

358+
# Explicitly enable mimalloc on 3.13+, it's already included by default but with this it'll fail
359+
# if it's missing from the system. The MUSL builds do not supprt mimalloc yet.
360+
if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" && "${CC}" != "musl-clang" ]]; then
361+
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --with-mimalloc"
362+
fi
363+
358364
if [ -n "${CPYTHON_FREETHREADED}" ]; then
359-
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --disable-gil --with-mimalloc"
365+
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --disable-gil"
360366
fi
361367

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

0 commit comments

Comments
 (0)