summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2019-07-22 20:41:03 +0000
committerYi Kong <yikong@google.com>2019-07-22 20:41:03 +0000
commitd7954f2c77498451d3f4debe56c85630286bdf51 (patch)
treed2e40d077ca1617108c27306467cdb938f596013
parentb4b1d855b724ea4405bc71554bb94c55b7462cb5 (diff)
downloadlibcxxabi-d7954f2c77498451d3f4debe56c85630286bdf51.tar.gz
[runtimes] Don't depend on libpthread on Android
r362048 added support for ELF dependent libraries, but broke Android build since Android does not have libpthread. Remove the dependency on the Android build. Differential Revision: https://reviews.llvm.org/D65098 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@366734 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--src/cxa_exception_storage.cpp2
-rw-r--r--src/cxa_guard_impl.h2
-rw-r--r--src/cxa_thread_atexit.cpp2
-rw-r--r--src/fallback_malloc.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/cxa_exception_storage.cpp b/src/cxa_exception_storage.cpp
index 81ba5f0..1a95954 100644
--- a/src/cxa_exception_storage.cpp
+++ b/src/cxa_exception_storage.cpp
@@ -46,7 +46,7 @@ extern "C" {
#include "abort_message.h"
#include "fallback_malloc.h"
-#if defined(__unix__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
#pragma comment(lib, "pthread")
#endif
diff --git a/src/cxa_guard_impl.h b/src/cxa_guard_impl.h
index 935ba80..545731b 100644
--- a/src/cxa_guard_impl.h
+++ b/src/cxa_guard_impl.h
@@ -50,7 +50,7 @@
#include <stdlib.h>
#include <__threading_support>
#ifndef _LIBCXXABI_HAS_NO_THREADS
-#if defined(__unix__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
#pragma comment(lib, "pthread")
#endif
#endif
diff --git a/src/cxa_thread_atexit.cpp b/src/cxa_thread_atexit.cpp
index 3b60c29..392403b 100644
--- a/src/cxa_thread_atexit.cpp
+++ b/src/cxa_thread_atexit.cpp
@@ -10,7 +10,7 @@
#include "cxxabi.h"
#include <__threading_support>
#ifndef _LIBCXXABI_HAS_NO_THREADS
-#if defined(__unix__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
#pragma comment(lib, "pthread")
#endif
#endif
diff --git a/src/fallback_malloc.cpp b/src/fallback_malloc.cpp
index 73ea28e..9d62407 100644
--- a/src/fallback_malloc.cpp
+++ b/src/fallback_malloc.cpp
@@ -13,7 +13,7 @@
#include <__threading_support>
#ifndef _LIBCXXABI_HAS_NO_THREADS
-#if defined(__unix__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
+#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
#pragma comment(lib, "pthread")
#endif
#endif