From 1014d1b6ab84fe6229ac03ab25ee9890b8e01612 Mon Sep 17 00:00:00 2001 From: pdoane Date: Sun, 28 Aug 2022 10:14:47 -0700 Subject: [PATCH] Fix foundation support - Use builtin.target instead of std.Target.current - Fix loop check to use is_framework instead of is_sys_lib --- src/cmd/fetch.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/fetch.zig b/src/cmd/fetch.zig index 855e029..27b3da2 100644 --- a/src/cmd/fetch.zig +++ b/src/cmd/fetch.zig @@ -68,7 +68,7 @@ pub fn create_depszig(alloc: std.mem.Allocator, cachepath: string, dir: std.fs.D \\ llc = true; \\ } \\ for (pkg.frameworks) |item| { - \\ if (!std.Target.current.isDarwin()) @panic(exe.builder.fmt("a dependency is attempting to link to the framework {s}, which is only possible under Darwin", .{item})); + \\ if (!builtin.target.isDarwin()) @panic(exe.builder.fmt("a dependency is attempting to link to the framework {s}, which is only possible under Darwin", .{item})); \\ exe.linkFramework(item); \\ llc = true; \\ } @@ -339,7 +339,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul if (mod.has_framework_deps()) { try w.writeAll(" .frameworks = &.{"); for (mod.deps) |item, j| { - if (!item.is_sys_lib) continue; + if (!item.is_framework) continue; try w.print(" \"{}\"", .{std.zig.fmtEscapes(item.name)}); if (j != mod.deps.len - 1) try w.writeAll(","); }