mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
fix not setting a target glibc version on non-linux
This commit is contained in:
parent
56d8185650
commit
f04782785f
@ -507,16 +507,16 @@ void get_native_target(ZigTarget *target) {
|
||||
target->abi = target_default_abi(target->arch, target->os);
|
||||
}
|
||||
target->glibc_version = nullptr;
|
||||
#ifdef ZIG_OS_LINUX
|
||||
if (target_is_glibc(target)) {
|
||||
target->glibc_version = allocate<ZigGLibCVersion>(1);
|
||||
*target->glibc_version = {2, 17, 0};
|
||||
#ifdef ZIG_OS_LINUX
|
||||
Error err;
|
||||
if ((err = glibc_detect_native_version(target->glibc_version))) {
|
||||
// Use a default version.
|
||||
*target->glibc_version = {2, 17, 0};
|
||||
// Fall back to the default version.
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Error target_parse_archsub(ZigLLVM_ArchType *out_arch, ZigLLVM_SubArchType *out_sub,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user