mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-27 15:25:19 +00:00
libghostty: enable cross-compiling macOS from Linux/Windows
This allows libghostty-vt to be cross-compiled for macOS from non-macOS platforms. I've updated pkg/apple-sdk to fallback to Zig's embedded macOS headers if the macOS SDK is not found. Additionally, CombineArchivesStep has been updated to use Linux tooling on Linux.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
//! Uses libtool on Darwin and a cross-platform MRI-script build tool
|
||||
//! on all other platforms (including Windows).
|
||||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
const LibtoolStep = @import("LibtoolStep.zig");
|
||||
|
||||
/// Combine multiple static archives into a single fat archive.
|
||||
@@ -15,7 +16,9 @@ pub fn create(
|
||||
name: []const u8,
|
||||
sources: []const std.Build.LazyPath,
|
||||
) struct { step: *std.Build.Step, output: std.Build.LazyPath } {
|
||||
if (target.result.os.tag.isDarwin()) {
|
||||
if (target.result.os.tag.isDarwin() and
|
||||
comptime builtin.os.tag.isDarwin())
|
||||
{
|
||||
const libtool = LibtoolStep.create(b, .{
|
||||
.name = name,
|
||||
.out_name = b.fmt("lib{s}-fat.a", .{name}),
|
||||
|
||||
Reference in New Issue
Block a user