From 8eca338c27477ae615e7e519b17fdbc0d236d2df Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 25 Jun 2025 05:17:46 -0700 Subject: [PATCH] fix `zig libc` FTBFS --- lib/compiler/libc.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/compiler/libc.zig b/lib/compiler/libc.zig index 866dd1535e..2f4c26b0cc 100644 --- a/lib/compiler/libc.zig +++ b/lib/compiler/libc.zig @@ -69,7 +69,7 @@ pub fn main() !void { const libc_installation: ?*LibCInstallation = libc: { if (input_file) |libc_file| { const libc = try arena.create(LibCInstallation); - libc.* = LibCInstallation.parse(arena, libc_file, target) catch |err| { + libc.* = LibCInstallation.parse(arena, libc_file, &target) catch |err| { fatal("unable to parse libc file at path {s}: {s}", .{ libc_file, @errorName(err) }); }; break :libc libc; @@ -83,7 +83,7 @@ pub fn main() !void { const libc_dirs = std.zig.LibCDirs.detect( arena, zig_lib_directory, - target, + &target, is_native_abi, true, libc_installation, @@ -108,7 +108,7 @@ pub fn main() !void { } if (input_file) |libc_file| { - var libc = LibCInstallation.parse(gpa, libc_file, target) catch |err| { + var libc = LibCInstallation.parse(gpa, libc_file, &target) catch |err| { fatal("unable to parse libc file at path {s}: {s}", .{ libc_file, @errorName(err) }); }; defer libc.deinit(gpa); @@ -119,7 +119,7 @@ pub fn main() !void { var libc = LibCInstallation.findNative(.{ .allocator = gpa, .verbose = true, - .target = target, + .target = &target, }) catch |err| { fatal("unable to detect native libc: {s}", .{@errorName(err)}); };