[libcxxabi] r345534 - [libc++abi] Provide __cxa_thread_atexit on Fuchsia

Petr Hosek phosek at chromium.org
Mon Oct 29 13:20:26 PDT 2018


Author: phosek
Date: Mon Oct 29 13:20:26 2018
New Revision: 345534

URL: http://llvm.org/viewvc/llvm-project?rev=345534&view=rev
Log:
[libc++abi] Provide __cxa_thread_atexit on Fuchsia

Fuchsia already supports this interface.

Differential Revision: https://reviews.llvm.org/D53801

Modified:
    libcxxabi/trunk/include/cxxabi.h
    libcxxabi/trunk/src/CMakeLists.txt

Modified: libcxxabi/trunk/include/cxxabi.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/include/cxxabi.h?rev=345534&r1=345533&r2=345534&view=diff
==============================================================================
--- libcxxabi/trunk/include/cxxabi.h (original)
+++ libcxxabi/trunk/include/cxxabi.h Mon Oct 29 13:20:26 2018
@@ -160,8 +160,8 @@ __cxa_decrement_exception_refcount(void
 extern _LIBCXXABI_FUNC_VIS bool __cxa_uncaught_exception() throw();
 extern _LIBCXXABI_FUNC_VIS unsigned int __cxa_uncaught_exceptions() throw();
 
-#ifdef __linux__
-// Linux TLS support. Not yet an official part of the Itanium ABI.
+#if defined(__linux__) || defined(__Fuchsia__)
+// Linux and Fuchsia TLS support. Not yet an official part of the Itanium ABI.
 // https://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables
 extern _LIBCXXABI_FUNC_VIS int __cxa_thread_atexit(void (*)(void *), void *,
                                                    void *) throw();

Modified: libcxxabi/trunk/src/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/CMakeLists.txt?rev=345534&r1=345533&r2=345534&view=diff
==============================================================================
--- libcxxabi/trunk/src/CMakeLists.txt (original)
+++ libcxxabi/trunk/src/CMakeLists.txt Mon Oct 29 13:20:26 2018
@@ -31,7 +31,7 @@ else()
   list(APPEND LIBCXXABI_SOURCES cxa_noexception.cpp)
 endif()
 
-if (LIBCXXABI_ENABLE_THREADS AND UNIX AND NOT (APPLE OR CYGWIN))
+if (LIBCXXABI_ENABLE_THREADS AND (UNIX OR FUCHSIA) AND NOT (APPLE OR CYGWIN))
   list(APPEND LIBCXXABI_SOURCES cxa_thread_atexit.cpp)
 endif()
 




More information about the libcxx-commits mailing list