Skip to content

Commit 710e2e7

Browse files
committed
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.
1 parent 0b72965 commit 710e2e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcxx.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ pub fn buildLibCXXABI(comp: *Compilation) !void {
320320
}
321321
try cflags.append("-D_LIBCXXABI_HAS_NO_THREADS");
322322
try cflags.append("-D_LIBCPP_HAS_NO_THREADS");
323-
} else {
323+
} else if (target.abi.isGnu()) {
324324
try cflags.append("-DHAVE___CXA_THREAD_ATEXIT_IMPL");
325325
}
326326

0 commit comments

Comments
 (0)