[Lldb-commits] [PATCH] D49282: [cmake] Add option to skip building lldb-server

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 13 12:40:35 PDT 2018


xiaobai updated this revision to Diff 155459.
xiaobai added a comment.

Update unittest logic.


https://reviews.llvm.org/D49282

Files:
  cmake/modules/LLDBConfig.cmake
  tools/CMakeLists.txt
  unittests/tools/CMakeLists.txt


Index: unittests/tools/CMakeLists.txt
===================================================================
--- unittests/tools/CMakeLists.txt
+++ unittests/tools/CMakeLists.txt
@@ -1,5 +1,5 @@
 if(CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|Linux|NetBSD")
-  if (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND SKIP_DEBUGSERVER)
+  if ((CMAKE_SYSTEM_NAME MATCHES "Darwin" AND SKIP_DEBUGSERVER) OR (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" AND SKIP_LLDB_SERVER_BUILD))
     # These tests are meant to test lldb-server/debugserver in isolation, and
     # don't provide any value if run against a server copied from somewhere.
   else()
Index: tools/CMakeLists.txt
===================================================================
--- tools/CMakeLists.txt
+++ tools/CMakeLists.txt
@@ -5,7 +5,7 @@
 add_subdirectory(argdumper)
 add_subdirectory(driver)
 add_subdirectory(lldb-mi)
-if (LLDB_CAN_USE_LLDB_SERVER)
+if (LLDB_CAN_USE_LLDB_SERVER AND NOT SKIP_LLDB_SERVER_BUILD)
   add_subdirectory(lldb-server)
 endif()
 add_subdirectory(intel-features)
Index: cmake/modules/LLDBConfig.cmake
===================================================================
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -358,6 +358,8 @@
 
 list(APPEND system_libs ${CMAKE_DL_LIBS})
 
+SET(SKIP_LLDB_SERVER_BUILD OFF CACHE BOOL "Skip building lldb-server")
+
 # Figure out if lldb could use lldb-server.  If so, then we'll
 # ensure we build lldb-server when an lldb target is being built.
 if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49282.155459.patch
Type: text/x-patch
Size: 1552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180713/97d91565/attachment.bin>


More information about the lldb-commits mailing list