[Lldb-commits] [PATCH] D64994: [CMake] Align debugserver with lldb-server on Darwin

Phabricator via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Jul 20 04:18:42 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL366631: [CMake] Align debugserver with lldb-server on Darwin (authored by stefan.graenitz, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D64994?vs=210832&id=210951#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64994/new/

https://reviews.llvm.org/D64994

Files:
  lldb/trunk/cmake/modules/LLDBConfig.cmake
  lldb/trunk/test/CMakeLists.txt
  lldb/trunk/tools/CMakeLists.txt
  lldb/trunk/unittests/CMakeLists.txt
  lldb/trunk/unittests/tools/lldb-server/CMakeLists.txt


Index: lldb/trunk/cmake/modules/LLDBConfig.cmake
===================================================================
--- lldb/trunk/cmake/modules/LLDBConfig.cmake
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake
@@ -373,17 +373,17 @@
 # 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")
-  set(LLDB_CAN_USE_LLDB_SERVER 1)
+  set(LLDB_CAN_USE_LLDB_SERVER ON)
 else()
-  set(LLDB_CAN_USE_LLDB_SERVER 0)
+  set(LLDB_CAN_USE_LLDB_SERVER OFF)
 endif()
 
 # Figure out if lldb could use debugserver.  If so, then we'll
 # ensure we build debugserver when we build lldb.
-if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
-    set(LLDB_CAN_USE_DEBUGSERVER 1)
+if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
+    set(LLDB_CAN_USE_DEBUGSERVER ON)
 else()
-    set(LLDB_CAN_USE_DEBUGSERVER 0)
+    set(LLDB_CAN_USE_DEBUGSERVER OFF)
 endif()
 
 if (NOT LLDB_DISABLE_CURSES)
Index: lldb/trunk/test/CMakeLists.txt
===================================================================
--- lldb/trunk/test/CMakeLists.txt
+++ lldb/trunk/test/CMakeLists.txt
@@ -101,11 +101,18 @@
     lldb_find_system_debugserver(system_debugserver_path)
     message(STATUS "LLDB tests use out-of-tree debugserver: ${system_debugserver_path}")
     list(APPEND LLDB_TEST_COMMON_ARGS --out-of-tree-debugserver)
-  else()
+  elseif(TARGET debugserver)
     set(debugserver_path ${LLVM_RUNTIME_OUTPUT_INTDIR}/debugserver)
     message(STATUS "LLDB Tests use just-built debugserver: ${debugserver_path}")
     list(APPEND LLDB_TEST_COMMON_ARGS --server ${debugserver_path})
     add_dependencies(lldb-test-deps debugserver)
+  elseif(TARGET lldb-server)
+    set(lldb_server_path ${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb-server)
+    message(STATUS "LLDB Tests use just-built lldb-server: ${lldb_server_path}")
+    list(APPEND LLDB_TEST_COMMON_ARGS --server ${lldb_server_path})
+    add_dependencies(lldb-test-deps lldb-server)
+  else()
+    message(WARNING "LLDB Tests enabled, but no server available")
   endif()
 endif()
 
Index: lldb/trunk/unittests/tools/lldb-server/CMakeLists.txt
===================================================================
--- lldb/trunk/unittests/tools/lldb-server/CMakeLists.txt
+++ lldb/trunk/unittests/tools/lldb-server/CMakeLists.txt
@@ -13,7 +13,7 @@
 add_lldb_test_executable(thread_inferior inferior/thread_inferior.cpp)
 add_lldb_test_executable(environment_check inferior/environment_check.cpp)
 
-if(LLDB_CAN_USE_DEBUGSERVER)
+if(LLDB_CAN_USE_DEBUGSERVER AND LLDB_TOOL_DEBUGSERVER_BUILD)
   if(LLDB_USE_SYSTEM_DEBUGSERVER)
     lldb_find_system_debugserver(debugserver_path)
   else()
Index: lldb/trunk/unittests/CMakeLists.txt
===================================================================
--- lldb/trunk/unittests/CMakeLists.txt
+++ lldb/trunk/unittests/CMakeLists.txt
@@ -78,6 +78,6 @@
 add_subdirectory(UnwindAssembly)
 add_subdirectory(Utility)
 
-if(LLDB_CAN_USE_DEBUGSERVER AND NOT LLDB_USE_SYSTEM_DEBUGSERVER)
+if(LLDB_CAN_USE_DEBUGSERVER AND LLDB_TOOL_DEBUGSERVER_BUILD AND NOT LLDB_USE_SYSTEM_DEBUGSERVER)
   add_subdirectory(debugserver)
 endif()
Index: lldb/trunk/tools/CMakeLists.txt
===================================================================
--- lldb/trunk/tools/CMakeLists.txt
+++ lldb/trunk/tools/CMakeLists.txt
@@ -11,8 +11,8 @@
 add_lldb_tool_subdirectory(lldb-vscode)
 
 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  add_subdirectory(darwin-debug)
-  add_subdirectory(debugserver)
+  add_lldb_tool_subdirectory(darwin-debug)
+  add_lldb_tool_subdirectory(debugserver)
 endif()
 
 if (LLDB_CAN_USE_LLDB_SERVER)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64994.210951.patch
Type: text/x-patch
Size: 3673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190720/e5d9e24f/attachment.bin>


More information about the lldb-commits mailing list