Skip to content

Commit 5664603

Browse files
committed
Bump to LLVM 19 on 3.13
1 parent 85af95a commit 5664603

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

cpython-unix/build-cpython.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,12 @@ if [ -n "${CPYTHON_OPTIMIZED}" ]; then
428428
# Allow users to enable the experimental JIT on 3.13+
429429
if [[ -n "${PYTHON_MEETS_MINIMUM_VERSION_3_13}" ]]; then
430430
CONFIGURE_FLAGS="${CONFIGURE_FLAGS} --enable-experimental-jit=yes-off"
431+
432+
if [[ -n "${PYTHON_MEETS_MAXIMUM_VERSION_3_13}" ]]; then
433+
# On 3.13, LLVM 18 is hard-coded into the configure script. Override it to our toolchain
434+
# version.
435+
patch -p1 -i "${ROOT}/patch-jit-llvm-19.patch"
436+
fi
431437
fi
432438
fi
433439

cpython-unix/patch-jit-llvm-19.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/Tools/jit/_llvm.py b/Tools/jit/_llvm.py
2+
--- a/Tools/jit/_llvm.py
3+
+++ b/Tools/jit/_llvm.py
4+
@@ -8,7 +8,7 @@
5+
import subprocess
6+
import typing
7+
8+
-_LLVM_VERSION = 18
9+
+_LLVM_VERSION = 19
10+
_LLVM_VERSION_PATTERN = re.compile(rf"version\s+{_LLVM_VERSION}\.\d+\.\d+\S*\s+")
11+
12+
_P = typing.ParamSpec("_P")

0 commit comments

Comments
 (0)