mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
fix zig libc FTBFS
This commit is contained in:
parent
75d6d4c3f2
commit
8eca338c27
@ -69,7 +69,7 @@ pub fn main() !void {
|
|||||||
const libc_installation: ?*LibCInstallation = libc: {
|
const libc_installation: ?*LibCInstallation = libc: {
|
||||||
if (input_file) |libc_file| {
|
if (input_file) |libc_file| {
|
||||||
const libc = try arena.create(LibCInstallation);
|
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) });
|
fatal("unable to parse libc file at path {s}: {s}", .{ libc_file, @errorName(err) });
|
||||||
};
|
};
|
||||||
break :libc libc;
|
break :libc libc;
|
||||||
@ -83,7 +83,7 @@ pub fn main() !void {
|
|||||||
const libc_dirs = std.zig.LibCDirs.detect(
|
const libc_dirs = std.zig.LibCDirs.detect(
|
||||||
arena,
|
arena,
|
||||||
zig_lib_directory,
|
zig_lib_directory,
|
||||||
target,
|
&target,
|
||||||
is_native_abi,
|
is_native_abi,
|
||||||
true,
|
true,
|
||||||
libc_installation,
|
libc_installation,
|
||||||
@ -108,7 +108,7 @@ pub fn main() !void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (input_file) |libc_file| {
|
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) });
|
fatal("unable to parse libc file at path {s}: {s}", .{ libc_file, @errorName(err) });
|
||||||
};
|
};
|
||||||
defer libc.deinit(gpa);
|
defer libc.deinit(gpa);
|
||||||
@ -119,7 +119,7 @@ pub fn main() !void {
|
|||||||
var libc = LibCInstallation.findNative(.{
|
var libc = LibCInstallation.findNative(.{
|
||||||
.allocator = gpa,
|
.allocator = gpa,
|
||||||
.verbose = true,
|
.verbose = true,
|
||||||
.target = target,
|
.target = &target,
|
||||||
}) catch |err| {
|
}) catch |err| {
|
||||||
fatal("unable to detect native libc: {s}", .{@errorName(err)});
|
fatal("unable to detect native libc: {s}", .{@errorName(err)});
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user