Fall back to Zig-bundled Darwin headers when an SDK can't be found#12534
Merged
mitchellh merged 1 commit intoghostty-org:mainfrom Apr 30, 2026
Merged
Fall back to Zig-bundled Darwin headers when an SDK can't be found#12534mitchellh merged 1 commit intoghostty-org:mainfrom
mitchellh merged 1 commit intoghostty-org:mainfrom
Conversation
Currently, cross to Darwin uses the Darwin headers bundled with Zig. However, if you're running a build _on_ Darwin, an error is thrown if the SDK can't be found, even though the bundled headers are still available. Now, we continue to search for and prefer the installed SDK, but if it can't be found, we fall back to the bundled headers rather than failing the build.
Member
|
What's the actual errors are you getting, im curious. |
Contributor
|
This looks right. Note @bo2themax this has been a build issue for a couple projects in #libghostty on Discord for awhile. I wonder if we can update our CI to also run this verification, we have macOS runners, maybe we should do a |
mitchellh
approved these changes
Apr 30, 2026
Contributor
mitchellh
left a comment
There was a problem hiding this comment.
Note my other comment but dont' want to block on that since this affects real projects. Pending CI green though.
Contributor
|
The CI failures were irrelevent. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, cross to Darwin uses the Darwin headers bundled with Zig. However, if you're running a build on Darwin, an error is thrown if the SDK can't be found, even though the bundled headers are still available.
Now, we continue to search for and prefer the installed SDK, but if it can't be found, we fall back to the bundled headers rather than failing the build.