diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-11-12 12:57:00 -0800 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-11-12 12:58:26 -0800 |
| commit | fbb228c7d222b991bed20d674e3b43143848fb95 (patch) | |
| tree | 3e94576c7f88ca40eb34833ccc67edb833e48381 | |
| parent | 9b1e86f0cb4768a7c09b58888a86dd4be60de02e (diff) | |
| download | bcm5719-llvm-fbb228c7d222b991bed20d674e3b43143848fb95.tar.gz bcm5719-llvm-fbb228c7d222b991bed20d674e3b43143848fb95.zip | |
[LLDB] Always remove debugserver from LLVM_DISTRIBUTION_COMPONENTS
Centralize the logic to remove debugserver from
LLVM_DISTRIBUTION_COMPONENTS when LLDB_USE_SYSTEM_DEBUGSERVER is
enabled. Now this happens regardless of whether the tests are enabled.
| -rw-r--r-- | lldb/cmake/modules/LLDBConfig.cmake | 9 | ||||
| -rw-r--r-- | lldb/test/API/CMakeLists.txt | 6 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake index e9ed2229d6b..2a709f81981 100644 --- a/lldb/cmake/modules/LLDBConfig.cmake +++ b/lldb/cmake/modules/LLDBConfig.cmake @@ -54,6 +54,15 @@ option(LLDB_NO_INSTALL_DEFAULT_RPATH "Disable default RPATH settings in binaries option(LLDB_USE_SYSTEM_DEBUGSERVER "Use the system's debugserver for testing (Darwin only)." OFF) option(LLDB_SKIP_STRIP "Whether to skip stripping of binaries when installing lldb." OFF) +if (LLDB_USE_SYSTEM_DEBUGSERVER) + # The custom target for the system debugserver has no install target, so we + # need to remove it from the LLVM_DISTRIBUTION_COMPONENTS list. + if (LLVM_DISTRIBUTION_COMPONENTS) + list(REMOVE_ITEM LLVM_DISTRIBUTION_COMPONENTS debugserver) + set(LLVM_DISTRIBUTION_COMPONENTS ${LLVM_DISTRIBUTION_COMPONENTS} CACHE STRING "" FORCE) + endif() +endif() + if(LLDB_BUILD_FRAMEWORK) if(NOT APPLE) message(FATAL_ERROR "LLDB.framework can only be generated when targeting Apple platforms") diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt index 9aec808073e..45f62272541 100644 --- a/lldb/test/API/CMakeLists.txt +++ b/lldb/test/API/CMakeLists.txt @@ -122,12 +122,6 @@ if(CMAKE_HOST_APPLE) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${system_debugserver_path} ${LLVM_RUNTIME_OUTPUT_INTDIR} COMMENT "Copying the system debugserver to LLDB's binaries directory for testing.") - # The custom target for the system debugserver has no install target, so we - # need to remove it from the LLVM_DISTRIBUTION_COMPONENTS list. - if (LLVM_DISTRIBUTION_COMPONENTS) - list(REMOVE_ITEM LLVM_DISTRIBUTION_COMPONENTS debugserver) - set(LLVM_DISTRIBUTION_COMPONENTS ${LLVM_DISTRIBUTION_COMPONENTS} PARENT_SCOPE) - endif() message(STATUS "LLDB tests use out-of-tree debugserver: ${system_debugserver_path}") list(APPEND LLDB_TEST_COMMON_ARGS --out-of-tree-debugserver) add_lldb_test_dependency(debugserver) |

