diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-05-13 22:55:11 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-05-13 22:55:11 +0000 |
| commit | 1d8b2a066191e0092a4db830c323cefeb3331d54 (patch) | |
| tree | a9ae58107925dfbe0bf720b6229b42ca2e5c86a9 /lldb | |
| parent | 51e79f06342b7a39f2e794b19bcd464d4c592f05 (diff) | |
| download | bcm5719-llvm-1d8b2a066191e0092a4db830c323cefeb3331d54.tar.gz bcm5719-llvm-1d8b2a066191e0092a4db830c323cefeb3331d54.zip | |
[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.
llvm-svn: 360631
Diffstat (limited to 'lldb')
| -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() |

