diff options
-rw-r--r-- | lldb/cmake/modules/LLDBConfig.cmake | 6 | ||||
-rw-r--r-- | lldb/tools/CMakeLists.txt | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake index a330eff6d2f..e8e04a531bd 100644 --- a/lldb/cmake/modules/LLDBConfig.cmake +++ b/lldb/cmake/modules/LLDBConfig.cmake @@ -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 diff --git a/lldb/tools/CMakeLists.txt b/lldb/tools/CMakeLists.txt index dbee1dda05d..80fec62b361 100644 --- a/lldb/tools/CMakeLists.txt +++ b/lldb/tools/CMakeLists.txt @@ -9,10 +9,13 @@ add_subdirectory(lldb-test EXCLUDE_FROM_ALL) 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() |