Skip to content

Commit abdb1f0

Browse files
author
kongyi
committed
[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: http://llvm.org/svn/llvm-project/libcxxabi/trunk@366734 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 012b689 commit abdb1f0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/cxa_exception_storage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extern "C" {
4646
#include "abort_message.h"
4747
#include "fallback_malloc.h"
4848

49-
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
49+
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
5050
#pragma comment(lib, "pthread")
5151
#endif
5252

src/cxa_guard_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#include <stdlib.h>
5151
#include <__threading_support>
5252
#ifndef _LIBCXXABI_HAS_NO_THREADS
53-
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
53+
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
5454
#pragma comment(lib, "pthread")
5555
#endif
5656
#endif

src/cxa_thread_atexit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "cxxabi.h"
1111
#include <__threading_support>
1212
#ifndef _LIBCXXABI_HAS_NO_THREADS
13-
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
13+
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
1414
#pragma comment(lib, "pthread")
1515
#endif
1616
#endif

src/fallback_malloc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include <__threading_support>
1515
#ifndef _LIBCXXABI_HAS_NO_THREADS
16-
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
16+
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCXXABI_HAS_COMMENT_LIB_PRAGMA)
1717
#pragma comment(lib, "pthread")
1818
#endif
1919
#endif

0 commit comments

Comments
 (0)