libcxx: only pass -DHAVE___CXA_THREAD_ATEXIT_IMPL for glibc

This definition communicates to libcxxabi that the libc will provide the
`__cxa_thread_atexit_impl` symbol. This is true for glibc but not
true for other libcs, such as musl.
This commit is contained in:
Andrew Kelley 2022-10-26 12:56:29 -07:00
parent 0b72965dbf
commit 710e2e7f10

View File

@ -320,7 +320,7 @@ pub fn buildLibCXXABI(comp: *Compilation) !void {
}
try cflags.append("-D_LIBCXXABI_HAS_NO_THREADS");
try cflags.append("-D_LIBCPP_HAS_NO_THREADS");
} else {
} else if (target.abi.isGnu()) {
try cflags.append("-DHAVE___CXA_THREAD_ATEXIT_IMPL");
}