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")
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)