build: don't add deps when cross compiling to darwin
parent
b006101ddd
commit
85345c31cf
|
|
@ -1,6 +1,7 @@
|
|||
const Ghostty = @This();
|
||||
|
||||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
const Config = @import("Config.zig");
|
||||
const SharedDeps = @import("SharedDeps.zig");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
const SharedDeps = @This();
|
||||
|
||||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
|
||||
const Config = @import("Config.zig");
|
||||
const HelpStrings = @import("HelpStrings.zig");
|
||||
const MetallibStep = @import("MetallibStep.zig");
|
||||
|
|
@ -104,6 +106,19 @@ pub fn add(
|
|||
var static_libs = LazyPathList.init(b.allocator);
|
||||
errdefer static_libs.deinit();
|
||||
|
||||
// WARNING: This is a hack!
|
||||
// If we're cross-compiling to Darwin then we don't add any deps.
|
||||
// We don't support cross-compiling to Darwin but due to the way
|
||||
// lazy dependencies work with Zig, we call this function. So we just
|
||||
// bail. The build will fail but the build would've failed anyways.
|
||||
// And this lets other non-platform-specific targets like `lib-vt`
|
||||
// cross-compile properly.
|
||||
if (!builtin.target.os.tag.isDarwin() and
|
||||
self.config.target.result.os.tag.isDarwin())
|
||||
{
|
||||
return static_libs;
|
||||
}
|
||||
|
||||
// Every exe gets build options populated
|
||||
step.root_module.addOptions("build_options", self.options);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue