authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-06-25 05:17:46-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-06-25 05:17:46-07:00
log8eca338c27477ae615e7e519b17fdbc0d236d2df
treea99f997a605d05b0be315c33524154759da0ff41
parent75d6d4c3f20423eede8ecaf7bcc4eaa501c1af9d

fix `zig libc` FTBFS


1 files changed, 4 insertions(+), 4 deletions(-)

lib/compiler/libc.zig+4-4
...@@ -69,7 +69,7 @@ pub fn main() !void {...@@ -69,7 +69,7 @@ pub fn main() !void {
69 const libc_installation: ?*LibCInstallation = libc: {69 const libc_installation: ?*LibCInstallation = libc: {
70 if (input_file) |libc_file| {70 if (input_file) |libc_file| {
71 const libc = try arena.create(LibCInstallation);71 const libc = try arena.create(LibCInstallation);
72 libc.* = LibCInstallation.parse(arena, libc_file, target) catch |err| {72 libc.* = LibCInstallation.parse(arena, libc_file, &target) catch |err| {
73 fatal("unable to parse libc file at path {s}: {s}", .{ libc_file, @errorName(err) });73 fatal("unable to parse libc file at path {s}: {s}", .{ libc_file, @errorName(err) });
74 };74 };
75 break :libc libc;75 break :libc libc;
...@@ -83,7 +83,7 @@ pub fn main() !void {...@@ -83,7 +83,7 @@ pub fn main() !void {
83 const libc_dirs = std.zig.LibCDirs.detect(83 const libc_dirs = std.zig.LibCDirs.detect(
84 arena,84 arena,
85 zig_lib_directory,85 zig_lib_directory,
86 target,86 &target,
87 is_native_abi,87 is_native_abi,
88 true,88 true,
89 libc_installation,89 libc_installation,
...@@ -108,7 +108,7 @@ pub fn main() !void {...@@ -108,7 +108,7 @@ pub fn main() !void {
108 }108 }
109109
110 if (input_file) |libc_file| {110 if (input_file) |libc_file| {
111 var libc = LibCInstallation.parse(gpa, libc_file, target) catch |err| {111 var libc = LibCInstallation.parse(gpa, libc_file, &target) catch |err| {
112 fatal("unable to parse libc file at path {s}: {s}", .{ libc_file, @errorName(err) });112 fatal("unable to parse libc file at path {s}: {s}", .{ libc_file, @errorName(err) });
113 };113 };
114 defer libc.deinit(gpa);114 defer libc.deinit(gpa);
...@@ -119,7 +119,7 @@ pub fn main() !void {...@@ -119,7 +119,7 @@ pub fn main() !void {
119 var libc = LibCInstallation.findNative(.{119 var libc = LibCInstallation.findNative(.{
120 .allocator = gpa,120 .allocator = gpa,
121 .verbose = true,121 .verbose = true,
122 .target = target,122 .target = &target,
123 }) catch |err| {123 }) catch |err| {
124 fatal("unable to detect native libc: {s}", .{@errorName(err)});124 fatal("unable to detect native libc: {s}", .{@errorName(err)});
125 };125 };