[Lldb-commits] [lldb] r288661 - Clean up some use of __ANDROID_NDK__ in the cmake files

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 5 03:15:37 PST 2016


Author: labath
Date: Mon Dec  5 05:15:36 2016
New Revision: 288661

URL: http://llvm.org/viewvc/llvm-project?rev=288661&view=rev
Log:
Clean up some use of __ANDROID_NDK__ in the cmake files

Rationale:
scripts/Python/modules: android is excluded at a higher level, so no point in
  checking here
tools/lldb-mi: lldb-mi builds fine (with some cosmetic tweaks) on android, and
  there is no reason it shouldn't.
tools/lldb-server: LLDB_DISABLE_LIBEDIT/CURSES already take the platform into
  account, so there is no point in checking again.

I am reasonably confident this should not break the build on any platform, but
I'll keep an eye out on the bots.

Modified:
    lldb/trunk/scripts/Python/modules/CMakeLists.txt
    lldb/trunk/tools/CMakeLists.txt
    lldb/trunk/tools/lldb-mi/CMakeLists.txt
    lldb/trunk/tools/lldb-mi/MIUtilString.cpp
    lldb/trunk/tools/lldb-server/CMakeLists.txt

Modified: lldb/trunk/scripts/Python/modules/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/modules/CMakeLists.txt?rev=288661&r1=288660&r2=288661&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/modules/CMakeLists.txt (original)
+++ lldb/trunk/scripts/Python/modules/CMakeLists.txt Mon Dec  5 05:15:36 2016
@@ -6,6 +6,6 @@ if (CXX_SUPPORTS_NO_MACRO_REDEFINED)
 endif ()
 
 # build the Python readline suppression module only on Linux
-if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT __ANDROID_NDK__)
+if (CMAKE_SYSTEM_NAME MATCHES "Linux")
    add_subdirectory(readline)
 endif()

Modified: lldb/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/CMakeLists.txt?rev=288661&r1=288660&r2=288661&view=diff
==============================================================================
--- lldb/trunk/tools/CMakeLists.txt (original)
+++ lldb/trunk/tools/CMakeLists.txt Mon Dec  5 05:15:36 2016
@@ -2,11 +2,9 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   add_subdirectory(darwin-debug)
   add_subdirectory(debugserver)
 endif()
-  add_subdirectory(argdumper)
-  add_subdirectory(driver)
-if (NOT __ANDROID_NDK__)
-  add_subdirectory(lldb-mi)
-endif()
+add_subdirectory(argdumper)
+add_subdirectory(driver)
+add_subdirectory(lldb-mi)
 if (LLDB_CAN_USE_LLDB_SERVER)
   add_subdirectory(lldb-server)
 endif()

Modified: lldb/trunk/tools/lldb-mi/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/CMakeLists.txt?rev=288661&r1=288660&r2=288661&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/CMakeLists.txt (original)
+++ lldb/trunk/tools/lldb-mi/CMakeLists.txt Mon Dec  5 05:15:36 2016
@@ -87,7 +87,7 @@ set(LLVM_LINK_COMPONENTS Support)
 add_lldb_executable(lldb-mi ${LLDB_MI_SOURCES})
 
 target_link_libraries(lldb-mi liblldb)
-if ( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" )
+if (HAVE_LIBPTHREAD)
   target_link_libraries(lldb-mi pthread)
 endif ()
 

Modified: lldb/trunk/tools/lldb-mi/MIUtilString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MIUtilString.cpp?rev=288661&r1=288660&r2=288661&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MIUtilString.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MIUtilString.cpp Mon Dec  5 05:15:36 2016
@@ -8,6 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 // Third party headers
+#include <cstdlib>
 #include <inttypes.h> // for PRIx8
 #include <limits.h>   // for ULONG_MAX
 #include <memory>     // std::unique_ptr

Modified: lldb/trunk/tools/lldb-server/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/CMakeLists.txt?rev=288661&r1=288660&r2=288661&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/CMakeLists.txt (original)
+++ lldb/trunk/tools/lldb-server/CMakeLists.txt Mon Dec  5 05:15:36 2016
@@ -108,15 +108,13 @@ set( CLANG_USED_LIBS
   )
 
 set(LLDB_SYSTEM_LIBS)
-if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows" AND NOT __ANDROID_NDK__)
-  if (NOT LLDB_DISABLE_LIBEDIT)
-    list(APPEND LLDB_SYSTEM_LIBS edit)
-  endif()
-  if (NOT LLDB_DISABLE_CURSES)
-    list(APPEND LLDB_SYSTEM_LIBS ${CURSES_LIBRARIES})
-    if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
-      list(APPEND LLDB_SYSTEM_LIBS ${TERMINFO_LIBS})
-    endif()
+if (NOT LLDB_DISABLE_LIBEDIT)
+  list(APPEND LLDB_SYSTEM_LIBS edit)
+endif()
+if (NOT LLDB_DISABLE_CURSES)
+  list(APPEND LLDB_SYSTEM_LIBS ${CURSES_LIBRARIES})
+  if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
+    list(APPEND LLDB_SYSTEM_LIBS ${TERMINFO_LIBS})
   endif()
 endif()
 




More information about the lldb-commits mailing list