summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-10-29 20:20:26 +0000
committerPetr Hosek <phosek@chromium.org>2018-10-29 20:20:26 +0000
commit87cbbdf78b808510005a309a238186d11af96430 (patch)
tree3b18c3284bea035fe0fcd4bf5055152208c966a2
parent794d4c0c33d99585ae99a069e99ff2c06aa98b56 (diff)
downloadlibcxxabi-87cbbdf78b808510005a309a238186d11af96430.tar.gz
[libc++abi] Provide __cxa_thread_atexit on Fuchsia
Fuchsia already supports this interface. Differential Revision: https://reviews.llvm.org/D53801 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@345534 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/cxxabi.h4
-rw-r--r--src/CMakeLists.txt2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/cxxabi.h b/include/cxxabi.h
index 2596560..c6724ad 100644
--- a/include/cxxabi.h
+++ b/include/cxxabi.h
@@ -160,8 +160,8 @@ __cxa_decrement_exception_refcount(void *primary_exception) throw();
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();
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d3581cc..7e21fb2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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()