diff --git a/build.zig b/build.zig index 34f65af2c..bf2cfd5be 100644 --- a/build.zig +++ b/build.zig @@ -135,7 +135,6 @@ pub fn build(b: *std.build.Builder) !void { } // On Mac we can build the app. - const macapp = b.step("macapp", "Build macOS app using XCode."); if (builtin.target.isDarwin()) { const static_lib_aarch64 = lib: { const lib = b.addStaticLibrary(.{ @@ -147,7 +146,6 @@ pub fn build(b: *std.build.Builder) !void { lib.bundle_compiler_rt = true; lib.linkLibC(); lib.addOptions("build_options", exe_options); - b.default_step.dependOn(&lib.step); // Create a single static lib with all our dependencies merged var lib_list = try addDeps(b, lib, true); @@ -157,6 +155,7 @@ pub fn build(b: *std.build.Builder) !void { .out_name = "libghostty-aarch64-fat.a", .sources = lib_list.items, }); + libtool.step.dependOn(&lib.step); b.default_step.dependOn(&libtool.step); break :lib libtool; @@ -172,7 +171,6 @@ pub fn build(b: *std.build.Builder) !void { lib.bundle_compiler_rt = true; lib.linkLibC(); lib.addOptions("build_options", exe_options); - b.default_step.dependOn(&lib.step); // Create a single static lib with all our dependencies merged var lib_list = try addDeps(b, lib, true); @@ -182,6 +180,7 @@ pub fn build(b: *std.build.Builder) !void { .out_name = "libghostty-x86_64-fat.a", .sources = lib_list.items, }); + libtool.step.dependOn(&lib.step); b.default_step.dependOn(&libtool.step); break :lib libtool; @@ -206,7 +205,6 @@ pub fn build(b: *std.build.Builder) !void { }); xcframework.step.dependOn(&static_lib_universal.step); b.default_step.dependOn(&xcframework.step); - macapp.dependOn(&xcframework.step); } // wasm diff --git a/src/App.zig b/src/App.zig index aaeca8f86..685aea443 100644 --- a/src/App.zig +++ b/src/App.zig @@ -295,7 +295,3 @@ pub const Wasm = if (!builtin.target.isWasm()) struct {} else struct { // } // } }; - -pub const CAPI = struct { - const Ghostty = @import("main_c.zig").Ghostty; -}; diff --git a/src/build/LibtoolStep.zig b/src/build/LibtoolStep.zig index 98d03017b..09e5e7386 100644 --- a/src/build/LibtoolStep.zig +++ b/src/build/LibtoolStep.zig @@ -59,6 +59,7 @@ fn make(step: *Step) !void { "libtool {s}", .{self.name}, )); + run.condition = .always; run.addArgs(&.{ "libtool", "-static", "-o", output_path }); for (self.sources) |source| { run.addArg(source.getPath(self.builder)); diff --git a/src/build/LipoStep.zig b/src/build/LipoStep.zig index 9570a54c6..31fc0d5c6 100644 --- a/src/build/LipoStep.zig +++ b/src/build/LipoStep.zig @@ -61,6 +61,7 @@ fn make(step: *Step) !void { "lipo {s}", .{self.name}, )); + run.condition = .always; run.addArgs(&.{ "lipo", "-create", diff --git a/src/build/XCFrameworkStep.zig b/src/build/XCFrameworkStep.zig index 8522810df..c48fba4ff 100644 --- a/src/build/XCFrameworkStep.zig +++ b/src/build/XCFrameworkStep.zig @@ -59,6 +59,7 @@ fn make(step: *Step) !void { "xcframework delete {s}", .{self.name}, )); + run.condition = .always; run.addArgs(&.{ "rm", "-rf", output_path }); try run.step.make(); } @@ -67,6 +68,7 @@ fn make(step: *Step) !void { "xcframework {s}", .{self.name}, )); + run.condition = .always; run.addArgs(&.{ "xcodebuild", "-create-xcframework", "-library", self.library.getPath(self.builder), diff --git a/src/main_c.zig b/src/main_c.zig index 04cde6282..fba2a61d3 100644 --- a/src/main_c.zig +++ b/src/main_c.zig @@ -21,7 +21,6 @@ const main = @import("main.zig"); /// Global options so we can log. This is identical to main. pub const std_options = main.std_options; -pub usingnamespace @import("App.zig").CAPI; pub usingnamespace @import("config.zig").CAPI; /// Initialize ghostty global state. It is possible to have more than