]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] GH-146475: Block Apple Clang for building JIT stencils (#149188) (#149340)
authorSavannah Ostrowski <savannah@python.org>
Mon, 4 May 2026 00:29:26 +0000 (17:29 -0700)
committerGitHub <noreply@github.com>
Mon, 4 May 2026 00:29:26 +0000 (00:29 +0000)
GH-146475: Block Apple Clang for building JIT stencils (#149188)

(cherry picked from commit c0e064003954142b4ba820dfe149f893227c4f11)

Misc/NEWS.d/next/Build/2026-04-30-08-43-47.gh-issue-146475.1cL4hX.rst [new file with mode: 0644]
Tools/jit/_llvm.py

diff --git a/Misc/NEWS.d/next/Build/2026-04-30-08-43-47.gh-issue-146475.1cL4hX.rst b/Misc/NEWS.d/next/Build/2026-04-30-08-43-47.gh-issue-146475.1cL4hX.rst
new file mode 100644 (file)
index 0000000..225c659
--- /dev/null
@@ -0,0 +1,2 @@
+Block Apple Clang from being used to build the JIT as it ships without
+required LLVM tools.
index 606f280a14d974ed7c6bc0be435a55af66233bfb..b68da1b6be1007cd9b148c1573702a1f60b6a86a 100644 (file)
@@ -9,7 +9,9 @@ import subprocess
 import typing
 
 _LLVM_VERSION = 18
-_LLVM_VERSION_PATTERN = re.compile(rf"version\s+{_LLVM_VERSION}\.\d+\.\d+\S*\s+")
+_LLVM_VERSION_PATTERN = re.compile(
+    rf"(?<!Apple )(LLVM|clang) version\s+{_LLVM_VERSION}\.\d+\.\d+\S*\s+"
+)
 
 _P = typing.ParamSpec("_P")
 _R = typing.TypeVar("_R")