-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
extend/os/mac/system_config: show Metal Toolchain version #21309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the Metal Toolchain detection to display version information instead of just reporting "present". The change extracts version details from the Metal toolchain path and formats them in a user-friendly way.
- Changed from running
metal -vto usingxcrun --find metalto get the toolchain path - Added regex parsing to extract version components from the MetalToolchain path format
- Implemented version formatting with character arithmetic to convert numeric letter representations
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Is this accurate on x86_64? The paths are totally different so parsing the path isn't necessarily stable. |
|
|
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks looks good so far!
Signed-off-by: Patrick Linnane <patrick@linnane.io>
bbd2e4a to
c94a2b3
Compare
|
Reworked this a bit and should be much easier to read. @Bo98 I opted to just return early on Intel given support is winding down. |
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
brew lgtm(style, typechecking and tests) with your changes locally?Follow up to #21117. This matches how Apple derives the Metal toolchain version, since there is no literal build identifier on disk.