[Lldb-commits] [lldb] r360631 - [CMake] Reinstate LLDB_CAN_USE_LLDB_SERVER
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon May 13 15:55:11 PDT 2019
Author: jdevlieghere
Date: Mon May 13 15:55:11 2019
New Revision: 360631
URL: http://llvm.org/viewvc/llvm-project?rev=360631&view=rev
Log:
[CMake] Reinstate LLDB_CAN_USE_LLDB_SERVER
We cannot manipulate the LLDB_TOOL_LLDB_SERVER_BUILD directly from
LLDBConfig.cmake because this would set the variable before the option
is defined in AddLLVM.cmake. Instead, we need to use the
LLDB_CAN_USE_LLDB_SERVER variable to conditionally add the lldb-server
subdirectory. This should ensure the variable doesn't get cleared.
Modified:
lldb/trunk/cmake/modules/LLDBConfig.cmake
lldb/trunk/tools/CMakeLists.txt
Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=360631&r1=360630&r2=360631&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake Mon May 13 15:55:11 2019
@@ -416,8 +416,10 @@ list(APPEND system_libs ${CMAKE_DL_LIBS}
# 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 (NOT CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD")
- set(LLDB_TOOL_LLDB_SERVER_BUILD OFF)
+if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD")
+ set(LLDB_CAN_USE_LLDB_SERVER 1 INTERNAL)
+else()
+ set(LLDB_CAN_USE_LLDB_SERVER 0 INTERNAL)
endif()
# Figure out if lldb could use debugserver. If so, then we'll
Modified: lldb/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/CMakeLists.txt?rev=360631&r1=360630&r2=360631&view=diff
==============================================================================
--- lldb/trunk/tools/CMakeLists.txt (original)
+++ lldb/trunk/tools/CMakeLists.txt Mon May 13 15:55:11 2019
@@ -9,10 +9,13 @@ add_subdirectory(lldb-test EXCLUDE_FROM_
add_lldb_tool_subdirectory(lldb-instr)
add_lldb_tool_subdirectory(lldb-mi)
-add_lldb_tool_subdirectory(lldb-server)
add_lldb_tool_subdirectory(lldb-vscode)
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_subdirectory(darwin-debug)
add_subdirectory(debugserver)
endif()
+
+if (LLDB_CAN_USE_LLDB_SERVER)
+ add_lldb_tool_subdirectory(lldb-server)
+endif()
More information about the lldb-commits
mailing list