Skip to content

Commit e327a9e

Browse files
committed
Replace the old patch; disable on x86-64
1 parent c511938 commit e327a9e

File tree

2 files changed

+13
-27
lines changed

2 files changed

+13
-27
lines changed

cpython-unix/build-cpython.sh

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,6 @@ else
8383
patch -p1 -i ${ROOT}/patch-xopen-source-ios-legacy.patch
8484
fi
8585

86-
# Respect CFLAGS during JIT compilation.
87-
# Backports https://github.com/python/cpython/pull/134276
88-
if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]; then
89-
patch -p1 -i ${ROOT}/patch-jit-cflags-314.patch
90-
elif [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then
91-
patch -p1 -i ${ROOT}/patch-jit-cflags-313.patch
92-
93-
fi
94-
9586
# LIBTOOL_CRUFT is unused and breaks cross-compiling on macOS. Nuke it.
9687
# Submitted upstream at https://github.com/python/cpython/pull/101048.
9788
if [ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_11}" ]; then
@@ -463,15 +454,22 @@ if [ -n "${CPYTHON_OPTIMIZED}" ]; then
463454

464455
# Allow users to enable the experimental JIT on 3.13+
465456
if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]]; then
466-
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-experimental-jit=yes-off"
467457

468-
# The JIT build process is separate from the normal build and doesn't read our standard
469-
# compiler flags so we need to patch our Clang toolchain into the includes.
470-
# This is only necessary on macOS.
471-
if [[ "${PYBUILD_PLATFORM}" = "macos" ]]; then
472-
patch -p1 -i "${ROOT}/patch-jit-include-flags.patch"
458+
# Do not enable on x86-64 macOS because the JIT requires macOS 11+ and we are currently
459+
# using 10.15 as a miniumum version.
460+
if [ "${TARGET_TRIPLE}" != "x86_64-apple-darwin" ]; then
461+
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-experimental-jit=yes-off"
473462
fi
474463

464+
# Respect CFLAGS during JIT compilation.
465+
# Backports https://github.com/python/cpython/pull/134276
466+
if [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_14}" ]; then
467+
patch -p1 -i ${ROOT}/patch-jit-cflags-314.patch
468+
elif [ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]; then
469+
patch -p1 -i ${ROOT}/patch-jit-cflags-313.patch
470+
fi
471+
472+
475473
if [[ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_13}" ]]; then
476474
# On 3.13, LLVM 18 is hard-coded into the configure script. Override it to our toolchain
477475
# version.

cpython-unix/patch-jit-include-flags.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)