build: skip xcframework when cross-compiling

Gate the xcframework build on the host being macOS in addition to
the target, since xcodebuild is only available on macOS.
This commit is contained in:
Mitchell Hashimoto
2026-04-06 14:24:53 -07:00
parent 90b706b977
commit e1a0e40ec4

View File

@@ -152,8 +152,10 @@ pub fn build(b: *std.Build) !void {
).step);
}
// libghostty-vt xcframework (Apple only, universal binary)
if (config.target.result.os.tag.isDarwin()) {
// libghostty-vt xcframework (Apple only, universal binary).
// Only when building on macOS (not cross-compiling) since
// xcodebuild is required.
if (builtin.os.tag.isDarwin() and config.target.result.os.tag.isDarwin()) {
const universal = try buildpkg.GhosttyLibVt.initStaticAppleUniversal(
b,
&config,