Skip to content

Commit aa430e2

Browse files
authored
Enable the tail call interpreter on 3.14+ clang builds (#524)
1 parent 1ab3596 commit aa430e2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cpython-unix/build-cpython.sh

+7
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,13 @@ if [ "${PYBUILD_PLATFORM}" != "macos" ]; then
348348
fi
349349
fi
350350

351+
# On Python 3.14+, enable the tail calling interpreter which is more performant.
352+
# This is only available on Clang 19+
353+
# https://docs.python.org/3.14/using/configure.html#cmdoption-with-tail-call-interp
354+
if [[ "${CC}" = "clang" && -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]]; then
355+
EXTRA_CONFIGURE_FLAGS="${EXTRA_CONFIGURE_FLAGS} --with-tail-call-interp"
356+
fi
357+
351358
# On Python 3.12+ we need to link the special hacl library provided some SHA-256
352359
# implementations. Since we hack up the regular extension building mechanism, we
353360
# need to reinvent this wheel.

0 commit comments

Comments
 (0)