authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-10-26 12:56:29-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-10-27 01:03:11-04:00
log710e2e7f1048cb7d5a7c8d2bdd954f108dd94e7a
tree5952628c77285c6262658e01dee0e109fc2e748a
parent0b72965dbf545aa64eb9d9e33defc36af4e2e42c

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 files changed, 1 insertions(+), 1 deletions(-)

src/libcxx.zig+1-1
......@@ -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