[Lldb-commits] [lldb] r340560 - [cmake] Add option to skip building lldb-server

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 23 11:05:46 PDT 2018


Author: xiaobai
Date: Thu Aug 23 11:05:45 2018
New Revision: 340560

URL: http://llvm.org/viewvc/llvm-project?rev=340560&view=rev
Log:
[cmake] Add option to skip building lldb-server

Summary:
There is currently a way to skip the debugserver build. See how the CMake
variables SKIP_DEBUGSERVER and LLDB_CODESIGN_IDENTITY are used if you're
interested in that.

This allows us to skip building lldb-server as well. There is another
debug server called ds2 that can be used with LLDB. If you choose to use
ds2, this flag is very useful because it can cut down the build time of LLDB.

Differential Revision: https://reviews.llvm.org/D49282

Modified:
    lldb/trunk/cmake/modules/LLDBConfig.cmake
    lldb/trunk/tools/CMakeLists.txt
    lldb/trunk/unittests/tools/CMakeLists.txt

Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=340560&r1=340559&r2=340560&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake Thu Aug 23 11:05:45 2018
@@ -357,6 +357,8 @@ endif()
 
 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")

Modified: lldb/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/CMakeLists.txt?rev=340560&r1=340559&r2=340560&view=diff
==============================================================================
--- lldb/trunk/tools/CMakeLists.txt (original)
+++ lldb/trunk/tools/CMakeLists.txt Thu Aug 23 11:05:45 2018
@@ -6,7 +6,7 @@ add_subdirectory(argdumper)
 add_subdirectory(driver)
 add_subdirectory(lldb-mi)
 add_subdirectory(lldb-vscode)
-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)

Modified: lldb/trunk/unittests/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/tools/CMakeLists.txt?rev=340560&r1=340559&r2=340560&view=diff
==============================================================================
--- lldb/trunk/unittests/tools/CMakeLists.txt (original)
+++ lldb/trunk/unittests/tools/CMakeLists.txt Thu Aug 23 11:05:45 2018
@@ -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()




More information about the lldb-commits mailing list