Skip to content

Commit 8eca338

Browse files
committed
fix zig libc FTBFS
1 parent 75d6d4c commit 8eca338

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/compiler/libc.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub fn main() !void {
6969
const libc_installation: ?*LibCInstallation = libc: {
7070
if (input_file) |libc_file| {
7171
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| {
7373
fatal("unable to parse libc file at path {s}: {s}", .{ libc_file, @errorName(err) });
7474
};
7575
break :libc libc;
@@ -83,7 +83,7 @@ pub fn main() !void {
8383
const libc_dirs = std.zig.LibCDirs.detect(
8484
arena,
8585
zig_lib_directory,
86-
target,
86+
&target,
8787
is_native_abi,
8888
true,
8989
libc_installation,
@@ -108,7 +108,7 @@ pub fn main() !void {
108108
}
109109

110110
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| {
112112
fatal("unable to parse libc file at path {s}: {s}", .{ libc_file, @errorName(err) });
113113
};
114114
defer libc.deinit(gpa);
@@ -119,7 +119,7 @@ pub fn main() !void {
119119
var libc = LibCInstallation.findNative(.{
120120
.allocator = gpa,
121121
.verbose = true,
122-
.target = target,
122+
.target = &target,
123123
}) catch |err| {
124124
fatal("unable to detect native libc: {s}", .{@errorName(err)});
125125
};

0 commit comments

Comments
 (0)