Returns whether the Zig standard library requires libc in order to interface with the operating system on the given target.
pub fn targetRequiresLibC(target: *const std.Target) bool
pub fn targetRequiresLibC(target: *const std.Target) bool {
if (target.requiresLibC()) return true;
return switch (target.os.tag) {
.linux => switch (target.cpu.arch) {
// https://codeberg.org/ziglang/zig/issues/30943
.hppa,
.hppa64,
=> true,
else => false,
},
.freebsd => true, // https://codeberg.org/ziglang/zig/issues/30981
.netbsd => true, // https://codeberg.org/ziglang/zig/issues/30980
.openbsd => true, // https://codeberg.org/ziglang/zig/issues/30982
else => false,
};
}