gh-146475: Block Apple LLVM 21 from passing JIT tool version check#146478
gh-146475: Block Apple LLVM 21 from passing JIT tool version check#146478ashutoshk314 wants to merge 2 commits intopython:mainfrom
Conversation
|
The following commit authors need to sign the Contributor License Agreement: |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f29015ef58
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ) -> 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 version\s+{llvm_version}\.\d+\.\d+\S*\s+") |
There was a problem hiding this comment.
Accept clang version strings in tool check
_check_tool_version() now only matches outputs containing LLVM version, but the JIT tool lookup also validates clang in _find_tool(), and upstream clang --version reports clang version 21.x.y (not LLVM version). In environments with LLVM 21 clang, this makes the version check fail and run("clang", ...) eventually raise Can't find clang-21!, breaking JIT stencil builds even with a correct compiler installed.
Useful? React with 👍 / 👎.
Fixes #146475
The JIT is incompatible with Apple LLVM 21, but the tool version
check was passing it through. This change blocks Apple LLVM 21
from passing the check.