From e1a0e40ec4cfd7ae6ed7d99b92db733cea95a2c0 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 6 Apr 2026 14:24:53 -0700 Subject: [PATCH] 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. --- build.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index d8e8bd86a..074a6675e 100644 --- a/build.zig +++ b/build.zig @@ -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,