Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Block Apple LLVM 21 from passing the JIT tool version check, as the JIT is
incompatible with it.
2 changes: 1 addition & 1 deletion Tools/jit/_llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ 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 version\s+{llvm_version}\.\d+\.\d+\S*\s+")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my mac I had to add LLVM and clang to match the string. Can you please check?

Suggested change
_llvm_version_pattern = re.compile(rf"(?<!Apple )LLVM 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+")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ /Library/Developer/CommandLineTools/usr/bin/llvm-objdump --version
Apple LLVM version 21.0.0
  Optimized build.
...

$ /Library/Developer/CommandLineTools/usr/bin/clang --version
Apple clang version 21.0.0 (clang-2100.0.123.102)
Target: arm64-apple-darwin25.4.0
...

return bool(output and _llvm_version_pattern.search(output))


Expand Down
Loading