build: emit xcframework for libghostty-vt on macOS

On Darwin targets, the build now automatically produces a universal
(arm64 + x86_64) XCFramework at lib/ghostty-vt.xcframework under
the install prefix. This bundles the fat static library with headers
so consumers using Xcode or Swift PM can link libghostty-vt directly.
This commit is contained in:
Mitchell Hashimoto
2026-04-06 14:02:06 -07:00
parent f7a9e313cd
commit 05fb57dd40
3 changed files with 111 additions and 2 deletions

View File

@@ -152,6 +152,18 @@ pub fn build(b: *std.Build) !void {
).step);
}
// libghostty-vt xcframework (Apple only, universal binary)
if (config.target.result.os.tag.isDarwin()) {
const universal = try buildpkg.GhosttyLibVt.initStaticAppleUniversal(
b,
&config,
&deps,
&mod,
);
const xcframework = universal.xcframework();
b.getInstallStep().dependOn(xcframework.step);
}
// Helpgen
if (config.emit_helpgen) deps.help_strings.install();