fix not setting a target glibc version on non-linux

This commit is contained in:
Andrew Kelley 2019-07-07 19:24:44 -04:00
parent 56d8185650
commit f04782785f
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -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,