commit 710e2e7f1048cb7d5a7c8d2bdd954f108dd94e7a (tree)
parent 0b72965dbf545aa64eb9d9e33defc36af4e2e42c
Author: Andrew Kelley <andrew@ziglang.org>
Date: Wed, 26 Oct 2022 12:56:29 -0700
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libcxx.zig b/src/libcxx.zig
@@ -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");
}