mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
compiler: Link libc by default when targeting FreeBSD.
We don't yet have a direct syscall layer in std.os.freebsd.
This commit is contained in:
parent
4c2f1e01a7
commit
f3e851dbd0
@ -335,6 +335,13 @@ pub fn resolve(options: Options) ResolveError!Config {
|
||||
break :b true;
|
||||
}
|
||||
if (options.link_libc) |x| break :b x;
|
||||
switch (target.os.tag) {
|
||||
// These targets don't require libc, but we don't yet have a syscall layer for them,
|
||||
// so we default to linking libc for now.
|
||||
.freebsd,
|
||||
=> break :b true,
|
||||
else => {},
|
||||
}
|
||||
if (options.ensure_libc_on_non_freestanding and target.os.tag != .freestanding)
|
||||
break :b true;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user