diff options
author | Pavel Labath <labath@google.com> | 2016-12-02 11:15:15 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-12-02 11:15:15 +0000 |
commit | e705c8b5e606de939f34adccd493aabb219f944f (patch) | |
tree | 91d99b89ba34ad108936207bb175d814443eec49 /lldb/source/Host/common/Host.cpp | |
parent | 964782adbb1dc17413707e173f323a19ff479c7d (diff) | |
download | bcm5719-llvm-e705c8b5e606de939f34adccd493aabb219f944f.tar.gz bcm5719-llvm-e705c8b5e606de939f34adccd493aabb219f944f.zip |
Replace __ANDROID_NDK__ with __ANDROID__
Summary:
This replaces all the uses of the __ANDROID_NDK__ define with __ANDROID__. This
is a preparatory step to remove our custom android toolchain file and rely on
the standard android NDK one instead, which does not provide this define.
Instead I rely, on __ANDROID__, which is set by the compiler.
I haven't yet removed the cmake variable with the same name, as we will need to
do something completely different there -- NDK toolchain defines
CMAKE_SYSTEM_NAME to Android, while our current one pretends it's linux.
Reviewers: tberghammer, zturner
Subscribers: danalbert, srhines, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D27305
llvm-svn: 288494
Diffstat (limited to 'lldb/source/Host/common/Host.cpp')
-rw-r--r-- | lldb/source/Host/common/Host.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index e31930fd96c..f0d7e2e80e4 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -29,7 +29,7 @@ #if defined(__linux__) || defined(__FreeBSD__) || \ defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__NetBSD__) -#if !defined(__ANDROID__) && !defined(__ANDROID_NDK__) +#if !defined(__ANDROID__) #include <spawn.h> #endif #include <sys/syscall.h> @@ -320,7 +320,7 @@ lldb::tid_t Host::GetCurrentThreadID() { return thread_self; #elif defined(__FreeBSD__) return lldb::tid_t(pthread_getthreadid_np()); -#elif defined(__ANDROID_NDK__) +#elif defined(__ANDROID__) return lldb::tid_t(gettid()); #elif defined(__linux__) return lldb::tid_t(syscall(SYS_gettid)); @@ -454,7 +454,7 @@ bool Host::ResolveExecutableInBundle(FileSpec &file) { return false; } FileSpec Host::GetModuleFileSpecForHostAddress(const void *host_addr) { FileSpec module_filespec; -#if !defined(__ANDROID__) && !defined(__ANDROID_NDK__) +#if !defined(__ANDROID__) Dl_info info; if (::dladdr(host_addr, &info)) { if (info.dli_fname) @@ -622,7 +622,7 @@ Error Host::RunShellCommand(const Args &args, const FileSpec &working_dir, #if defined(__APPLE__) || defined(__linux__) || defined(__FreeBSD__) || \ defined(__GLIBC__) || defined(__NetBSD__) -#if !defined(__ANDROID__) && !defined(__ANDROID_NDK__) +#if !defined(__ANDROID__) // this method needs to be visible to macosx/Host.cpp and // common/Host.cpp. @@ -956,7 +956,7 @@ bool Host::AddPosixSpawnFileAction(void *_file_actions, const FileAction *info, } return error.Success(); } -#endif // !defined(__ANDROID__) && !defined(__ANDROID_NDK__) +#endif // !defined(__ANDROID__) #endif // defined (__APPLE__) || defined (__linux__) || defined (__FreeBSD__) || // defined (__GLIBC__) || defined(__NetBSD__) |