]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-146475: Block Apple Clang for building JIT stencils (#149188)
authorSavannah Ostrowski <savannah@python.org>
Thu, 30 Apr 2026 22:09:36 +0000 (15:09 -0700)
committerGitHub <noreply@github.com>
Thu, 30 Apr 2026 22:09:36 +0000 (22:09 +0000)
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 601752bf1f639687783728a4eed2ba2e0c0bc70a..96cf5fc4714737bbc9c1a94e223d7665f7650fa3 100644 (file)
@@ -69,7 +69,9 @@ async def _check_tool_version(
     name: str, llvm_version: str, *, echo: bool = False
 ) -> bool:
     output = await _run(name, ["--version"], echo=echo)
-    _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+"
+    )
     return bool(output and _llvm_version_pattern.search(output))