summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorMitchell Hashimoto <m@mitchellh.com>2025-07-04 14:56:21 -0700
committerMitchell Hashimoto <m@mitchellh.com>2025-07-04 14:56:25 -0700
commit3793dac3130c0a699702bce4dc69cf003b07d4e2 (patch)
treea4617c14cd37ea250b7e0ec4ae958e3be0a3acde /build.zig
parentfb9c52ecf44ee1004de16a4b02a67d4258e66c14 (diff)
build: zig build run only builds xcframework for current arch
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig30
1 files changed, 21 insertions, 9 deletions
diff --git a/build.zig b/build.zig
index 4bd6e0b46..d72bdc28c 100644
--- a/build.zig
+++ b/build.zig
@@ -95,7 +95,11 @@ pub fn build(b: *std.Build) !void {
if (!config.emit_xcframework) break :none;
// Build the xcframework
- const xcframework = try buildpkg.GhosttyXCFramework.init(b, &deps);
+ const xcframework = try buildpkg.GhosttyXCFramework.init(
+ b,
+ &deps,
+ .universal,
+ );
xcframework.install();
// The xcframework build always installs resources because our
@@ -113,15 +117,23 @@ pub fn build(b: *std.Build) !void {
}
// Build our macOS app
- const app = try buildpkg.GhosttyXcodebuild.init(
- b,
- &config,
- &xcframework,
- );
+ {
+ const xcframework_native = try buildpkg.GhosttyXCFramework.init(
+ b,
+ &deps,
+ .native,
+ );
+
+ const app = try buildpkg.GhosttyXcodebuild.init(
+ b,
+ &config,
+ &xcframework_native,
+ );
- // Add a run command that opens our mac app.
- const run_step = b.step("run", "Run the app");
- run_step.dependOn(&app.open.step);
+ // Add a run command that opens our mac app.
+ const run_step = b.step("run", "Run the app");
+ run_step.dependOn(&app.open.step);
+ }
}
// Tests