This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB360621: [CMake] Simplify lldb-server handling (authored by JDevlieghere, committed by ).
Changed prior to commit: https://reviews.llvm.org/D61872?vs=199327&id=199328#toc Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61872/new/ https://reviews.llvm.org/D61872 Files: cmake/modules/LLDBConfig.cmake tools/CMakeLists.txt unittests/tools/CMakeLists.txt Index: unittests/tools/CMakeLists.txt =================================================================== --- unittests/tools/CMakeLists.txt +++ unittests/tools/CMakeLists.txt @@ -1,9 +1,6 @@ -add_subdirectory(lldb-mi) -if(CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|Linux|NetBSD") - if ((CMAKE_SYSTEM_NAME MATCHES "Darwin" AND SKIP_TEST_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() - add_subdirectory(lldb-server) - endif() +if(LLDB_TOOL_LLDB_MI_BUILD) + add_subdirectory(lldb-mi) +endif() +if(LLDB_TOOL_LLDB_SERVER_BUILD) + add_subdirectory(lldb-server) endif() Index: tools/CMakeLists.txt =================================================================== --- tools/CMakeLists.txt +++ tools/CMakeLists.txt @@ -9,13 +9,10 @@ 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 AND NOT SKIP_LLDB_SERVER_BUILD) - add_subdirectory(lldb-server) -endif() Index: cmake/modules/LLDBConfig.cmake =================================================================== --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -414,14 +414,10 @@ 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") - set(LLDB_CAN_USE_LLDB_SERVER 1) -else() - set(LLDB_CAN_USE_LLDB_SERVER 0) +if (NOT CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD") + set(LLDB_TOOL_LLDB_SERVER_BUILD OFF) endif() # Figure out if lldb could use debugserver. If so, then we'll
Index: unittests/tools/CMakeLists.txt =================================================================== --- unittests/tools/CMakeLists.txt +++ unittests/tools/CMakeLists.txt @@ -1,9 +1,6 @@ -add_subdirectory(lldb-mi) -if(CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|Linux|NetBSD") - if ((CMAKE_SYSTEM_NAME MATCHES "Darwin" AND SKIP_TEST_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() - add_subdirectory(lldb-server) - endif() +if(LLDB_TOOL_LLDB_MI_BUILD) + add_subdirectory(lldb-mi) +endif() +if(LLDB_TOOL_LLDB_SERVER_BUILD) + add_subdirectory(lldb-server) endif() Index: tools/CMakeLists.txt =================================================================== --- tools/CMakeLists.txt +++ tools/CMakeLists.txt @@ -9,13 +9,10 @@ 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 AND NOT SKIP_LLDB_SERVER_BUILD) - add_subdirectory(lldb-server) -endif() Index: cmake/modules/LLDBConfig.cmake =================================================================== --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -414,14 +414,10 @@ 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") - set(LLDB_CAN_USE_LLDB_SERVER 1) -else() - set(LLDB_CAN_USE_LLDB_SERVER 0) +if (NOT CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD") + set(LLDB_TOOL_LLDB_SERVER_BUILD OFF) endif() # Figure out if lldb could use debugserver. If so, then we'll
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits