Skip to content

build: respect config.emit_xcframework for building libghostty-vt.xcframework on Darwin#12267

Open
0xDVC wants to merge 2 commits intoghostty-org:mainfrom
0xDVC:fix/xcframework-macos-dependency
Open

build: respect config.emit_xcframework for building libghostty-vt.xcframework on Darwin#12267
0xDVC wants to merge 2 commits intoghostty-org:mainfrom
0xDVC:fix/xcframework-macos-dependency

Conversation

@0xDVC
Copy link
Copy Markdown

@0xDVC 0xDVC commented Apr 13, 2026

This fixes a hardcoded build issue on macOS where Zig unconditionally forces xcodebuild -create-xcframework to run during compilation, even when the caller explicitly specifies that they only want the raw standard C objects/headers (-Demit-lib-vt).

…ramework on Darwin

This fixes a hardcoded build issue on macOS where Zig unconditionally forces xcodebuild -create-xcframework to run during compilation, even when the caller explicitly specifies that they only want the raw standard C objects/headers (-Demit-lib-vt).

The Bug:
Around line 155 in build.zig, the libghostty-vt xcframework was being packaged unconditionally for Darwin builds. This caused developers (and wrappers like go-libghostty) attempting to natively build the vt library locally using only the minimal macOS Command Line Tools to experience an immediate crash, as xcodebuild -create-xcframework strictly demands a full Xcode application installation.

The Fix:
Guarded the GhosttyLibVt xcframework creation step with config.emit_xcframework. Because src/build/Config.zig intuitively forces emit_xcframework to default to false whenever emit_lib_vt is invoked, this structurally allows lightweight macOS builds to safely skip the xcodebuild invocation while still correctly compiling the standard .a object library files.
@ghostty-vouch
Copy link
Copy Markdown
Contributor

ghostty-vouch bot commented Apr 13, 2026

Hi @0xDVC, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/ghostty-org/ghostty/blob/main/CONTRIBUTING.md for more details.

@ghostty-vouch ghostty-vouch bot closed this Apr 13, 2026
@mitchellh
Copy link
Copy Markdown
Contributor

!vouch

ghostty-vouch bot pushed a commit that referenced this pull request Apr 13, 2026
@ghostty-vouch ghostty-vouch bot mentioned this pull request Apr 13, 2026
ghostty-vouch bot added a commit that referenced this pull request Apr 13, 2026
Triggered by
[comment](#12267 (comment))
from @mitchellh.

Vouch: @0xDVC

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@mitchellh mitchellh reopened this Apr 13, 2026
@0xDVC 0xDVC marked this pull request as ready for review April 13, 2026 14:29
kazto pushed a commit to kazto/ghostty that referenced this pull request Apr 14, 2026
Triggered by
[comment](ghostty-org#12267 (comment))
from @mitchellh.

Vouch: @0xDVC

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@mitchellh mitchellh enabled auto-merge April 14, 2026 14:10
@mitchellh mitchellh added this to the 1.4.0 milestone Apr 14, 2026
@mitchellh
Copy link
Copy Markdown
Contributor

We've got some CI failures, we should look into it. I thought our swift example should have xcode and we should default emit xcframework to true.

auto-merge was automatically disabled April 14, 2026 18:00

Head branch was pushed to by a user without write access

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.

2 participants