Skip to content

Fall back to Zig-bundled Darwin headers when an SDK can't be found#12534

Merged
mitchellh merged 1 commit intoghostty-org:mainfrom
Samasaur1:push-nwpvqonwksot
Apr 30, 2026
Merged

Fall back to Zig-bundled Darwin headers when an SDK can't be found#12534
mitchellh merged 1 commit intoghostty-org:mainfrom
Samasaur1:push-nwpvqonwksot

Conversation

@Samasaur1
Copy link
Copy Markdown
Contributor

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.

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.
@Samasaur1 Samasaur1 requested a review from a team as a code owner April 30, 2026 06:35
@bo2themax
Copy link
Copy Markdown
Member

What's the actual errors are you getting, im curious.

@mitchellh
Copy link
Copy Markdown
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 nix build there and get our libghostty packages building properly on CI...

Copy link
Copy Markdown
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

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

Note my other comment but dont' want to block on that since this affects real projects. Pending CI green though.

@mitchellh mitchellh merged commit 83ae471 into ghostty-org:main Apr 30, 2026
88 of 90 checks passed
@mitchellh
Copy link
Copy Markdown
Contributor

The CI failures were irrelevent.

@mitchellh mitchellh added this to the 1.4.0 milestone Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants