[libcxx-commits] [libcxxabi] [libc++abi] Revert gating of `__cxa_thread_atexit` on Linux||Fuchsia (PR #186054)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 4 03:05:59 PDT 2026


================
@@ -134,4 +134,12 @@
 #  define _LIBCXXABI_DISABLE_POINTER_FIELD_PROTECTION
 #endif
 
+// On Apple, Clang generates calls to _tlv_atexit and __cxa_thread_atexit is defined
+// in libc instead.
+//
+// AIX uses a different mechanism for registering thread local destructors (__pt_atexit_np).
+#if !defined(__APPLE__) && !defined(_AIX)
+#  define _LIBCXXABI_DEFINE_THREAD_ATEXIT
+#endif
----------------
philnik777 wrote:

Can we make this a 0/1 macro instead?

https://github.com/llvm/llvm-project/pull/186054


More information about the libcxx-commits mailing list