mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
[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 llvm-svn: 366734
This commit is contained in:
parent
4de5d9d612
commit
d8bdb9225c
@ -10,7 +10,7 @@
|
|||||||
#include "random"
|
#include "random"
|
||||||
#ifndef _LIBCPP_HAS_NO_THREADS
|
#ifndef _LIBCPP_HAS_NO_THREADS
|
||||||
#include "mutex"
|
#include "mutex"
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "pthread")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "rt")
|
#pragma comment(lib, "rt")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "system_error"
|
#include "system_error"
|
||||||
#include "__undef_macros"
|
#include "__undef_macros"
|
||||||
|
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "pthread")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "__hash_table"
|
#include "__hash_table"
|
||||||
#ifndef _LIBCPP_HAS_NO_THREADS
|
#ifndef _LIBCPP_HAS_NO_THREADS
|
||||||
#include "mutex"
|
#include "mutex"
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "pthread")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "atomic"
|
#include "atomic"
|
||||||
#elif !defined(_LIBCPP_HAS_NO_THREADS)
|
#elif !defined(_LIBCPP_HAS_NO_THREADS)
|
||||||
#include "mutex"
|
#include "mutex"
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "pthread")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#include <sys/time.h> // for gettimeofday and timeval
|
#include <sys/time.h> // for gettimeofday and timeval
|
||||||
#endif // !defined(CLOCK_REALTIME)
|
#endif // !defined(CLOCK_REALTIME)
|
||||||
|
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "rt")
|
#pragma comment(lib, "rt")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef _LIBCPP_HAS_NO_THREADS
|
#ifndef _LIBCPP_HAS_NO_THREADS
|
||||||
#include "mutex"
|
#include "mutex"
|
||||||
#include "thread"
|
#include "thread"
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "pthread")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "__undef_macros"
|
#include "__undef_macros"
|
||||||
|
|
||||||
#ifndef _LIBCPP_HAS_NO_THREADS
|
#ifndef _LIBCPP_HAS_NO_THREADS
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "pthread")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef _LIBCPP_HAS_NO_THREADS
|
#ifndef _LIBCPP_HAS_NO_THREADS
|
||||||
|
|
||||||
#include "shared_mutex"
|
#include "shared_mutex"
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "pthread")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBCPP_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "pthread")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ extern "C" {
|
|||||||
#include "abort_message.h"
|
#include "abort_message.h"
|
||||||
#include "fallback_malloc.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")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <__threading_support>
|
#include <__threading_support>
|
||||||
#ifndef _LIBCXXABI_HAS_NO_THREADS
|
#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")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "cxxabi.h"
|
#include "cxxabi.h"
|
||||||
#include <__threading_support>
|
#include <__threading_support>
|
||||||
#ifndef _LIBCXXABI_HAS_NO_THREADS
|
#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")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#include <__threading_support>
|
#include <__threading_support>
|
||||||
#ifndef _LIBCXXABI_HAS_NO_THREADS
|
#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")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#if _LIBUNWIND_USE_DLADDR
|
#if _LIBUNWIND_USE_DLADDR
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBUNWIND_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && defined(__ELF__) && defined(_LIBUNWIND_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "dl")
|
#pragma comment(lib, "dl")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#elif !defined(_LIBUNWIND_HAS_NO_THREADS)
|
#elif !defined(_LIBUNWIND_HAS_NO_THREADS)
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#if defined(__unix__) && defined(__ELF__) && defined(_LIBUNWIND_HAS_COMMENT_LIB_PRAGMA)
|
#if defined(__unix__) && !defined(__ANDROID__) && defined(__ELF__) && defined(_LIBUNWIND_HAS_COMMENT_LIB_PRAGMA)
|
||||||
#pragma comment(lib, "pthread")
|
#pragma comment(lib, "pthread")
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user