diff --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt --- a/lldb/source/Host/CMakeLists.txt +++ b/lldb/source/Host/CMakeLists.txt @@ -106,12 +106,10 @@ linux/LibcGlue.cpp linux/Support.cpp ) - if (CMAKE_SYSTEM_NAME MATCHES "Android") - add_host_subdirectory(android - android/HostInfoAndroid.cpp - android/LibcGlue.cpp - ) - endif() + add_host_subdirectory(android + android/HostInfoAndroid.cpp + android/LibcGlue.cpp + ) elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") add_host_subdirectory(freebsd freebsd/Host.cpp diff --git a/lldb/source/Host/android/HostInfoAndroid.cpp b/lldb/source/Host/android/HostInfoAndroid.cpp --- a/lldb/source/Host/android/HostInfoAndroid.cpp +++ b/lldb/source/Host/android/HostInfoAndroid.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#if defined(__ANDROID__) + #include "lldb/Host/android/HostInfoAndroid.h" #include "lldb/Host/FileSystem.h" #include "lldb/Host/linux/HostInfoLinux.h" @@ -92,3 +94,5 @@ return FileSystem::Instance().Exists(file_spec); } + +#endif // __ANDROID__ diff --git a/lldb/source/Host/android/LibcGlue.cpp b/lldb/source/Host/android/LibcGlue.cpp --- a/lldb/source/Host/android/LibcGlue.cpp +++ b/lldb/source/Host/android/LibcGlue.cpp @@ -8,6 +8,8 @@ // This files adds functions missing from libc on earlier versions of Android +#if defined(__ANDROID__) + #include #include @@ -26,3 +28,5 @@ int posix_openpt(int flags) { return open("/dev/ptmx", flags); } #endif + +#endif // __ANDROID__