authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-07-07 19:24:44-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-07-07 19:24:44-04:00
logf04782785f66879db1f31dd6620cd31161c4da08
treee8abb9884235c1b9b3b84078809086c3c11ed798
parent56d818565015b8213f6c070236658c8796c86d0a
signature Commit is signed but in an unrecognized format.

fix not setting a target glibc version on non-linux


1 files changed, 4 insertions(+), 4 deletions(-)

src/target.cpp+4-4
...@@ -507,16 +507,16 @@ void get_native_target(ZigTarget *target) {...@@ -507,16 +507,16 @@ void get_native_target(ZigTarget *target) {
507 target->abi = target_default_abi(target->arch, target->os);507 target->abi = target_default_abi(target->arch, target->os);
508 }508 }
509 target->glibc_version = nullptr;509 target->glibc_version = nullptr;
510#ifdef ZIG_OS_LINUX
511 if (target_is_glibc(target)) {510 if (target_is_glibc(target)) {
512 target->glibc_version = allocate<ZigGLibCVersion>(1);511 target->glibc_version = allocate<ZigGLibCVersion>(1);
512 *target->glibc_version = {2, 17, 0};
513#ifdef ZIG_OS_LINUX
513 Error err;514 Error err;
514 if ((err = glibc_detect_native_version(target->glibc_version))) {515 if ((err = glibc_detect_native_version(target->glibc_version))) {
515 // Use a default version.516 // Fall back to the default version.
516 *target->glibc_version = {2, 17, 0};
517 }517 }
518 }
519#endif518#endif
519 }
520}520}
521521
522Error target_parse_archsub(ZigLLVM_ArchType *out_arch, ZigLLVM_SubArchType *out_sub,522Error target_parse_archsub(ZigLLVM_ArchType *out_arch, ZigLLVM_SubArchType *out_sub,