mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
Fix Android build of gtest and lib/Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163131 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5eae90d727
commit
68d92bdcc9
@ -85,9 +85,19 @@ check_include_file(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
|
||||
# library checks
|
||||
if( NOT PURE_WINDOWS )
|
||||
check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
|
||||
check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
|
||||
check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
|
||||
check_library_exists(pthread pthread_mutex_lock "" HAVE_PTHREAD_MUTEX_LOCK)
|
||||
if (HAVE_LIBPTHREAD)
|
||||
check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
|
||||
check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
|
||||
check_library_exists(pthread pthread_mutex_lock "" HAVE_PTHREAD_MUTEX_LOCK)
|
||||
else()
|
||||
# this could be Android
|
||||
check_library_exists(c pthread_create "" PTHREAD_IN_LIBC)
|
||||
if (PTHREAD_IN_LIBC)
|
||||
check_library_exists(c pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
|
||||
check_library_exists(c pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
|
||||
check_library_exists(c pthread_mutex_lock "" HAVE_PTHREAD_MUTEX_LOCK)
|
||||
endif()
|
||||
endif()
|
||||
check_library_exists(dl dlopen "" HAVE_LIBDL)
|
||||
endif()
|
||||
|
||||
|
@ -160,7 +160,7 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) {
|
||||
// On linux we have a weird situation. The stderr/out/in symbols are both
|
||||
// macros and global variables because of standards requirements. So, we
|
||||
// boldly use the EXPLICIT_SYMBOL macro without checking for a #define first.
|
||||
#if defined(__linux__)
|
||||
#if defined(__linux__) and !defined(__ANDROID__)
|
||||
{
|
||||
EXPLICIT_SYMBOL(stderr);
|
||||
EXPLICIT_SYMBOL(stdout);
|
||||
|
@ -49,7 +49,7 @@ LockFileManager::readLockFile(StringRef LockFileName) {
|
||||
}
|
||||
|
||||
bool LockFileManager::processStillExecuting(StringRef Hostname, int PID) {
|
||||
#if LLVM_ON_UNIX
|
||||
#if LLVM_ON_UNIX && !defined(__ANDROID__)
|
||||
char MyHostname[256];
|
||||
MyHostname[255] = 0;
|
||||
MyHostname[0] = 0;
|
||||
|
@ -230,7 +230,7 @@
|
||||
# define GTEST_OS_MAC 1
|
||||
#elif defined __linux__
|
||||
# define GTEST_OS_LINUX 1
|
||||
# ifdef ANDROID
|
||||
# if defined(ANDROID) || defined(__ANDROID__)
|
||||
# define GTEST_OS_LINUX_ANDROID 1
|
||||
# endif // ANDROID
|
||||
#elif defined __MVS__
|
||||
|
Loading…
Reference in New Issue
Block a user