mirror of
https://github.com/ziglang/zig.git
synced 2026-01-04 12:33:19 +00:00
Compilation.Config: Default to dynamic linking with NetBSD libc.
This commit is contained in:
parent
1a82cceb8c
commit
d29ba75c84
@ -362,7 +362,8 @@ pub fn resolve(options: Options) ResolveError!Config {
|
||||
if (explicitly_exe_or_dyn_lib and link_libc and
|
||||
(target_util.osRequiresLibC(target) or
|
||||
// For these libcs, Zig can only provide dynamic libc when cross-compiling.
|
||||
((target.isGnuLibC() or target.isFreeBSDLibC()) and !options.resolved_target.is_native_abi)))
|
||||
((target.isGnuLibC() or target.isFreeBSDLibC() or target.isNetBSDLibC()) and
|
||||
!options.resolved_target.is_native_abi)))
|
||||
{
|
||||
if (options.link_mode == .static) return error.LibCRequiresDynamicLinking;
|
||||
break :b .dynamic;
|
||||
@ -386,7 +387,7 @@ pub fn resolve(options: Options) ResolveError!Config {
|
||||
// When targeting systems where the kernel and libc are developed alongside each other,
|
||||
// dynamic linking is the better default; static libc may contain code that requires
|
||||
// the very latest kernel version.
|
||||
if (target.isFreeBSDLibC()) {
|
||||
if (target.isFreeBSDLibC() or target.isNetBSDLibC()) {
|
||||
break :b .dynamic;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user