From c6288759296f808a2f7304bbd1bd5b18974e4ccc Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 24 Sep 2021 14:59:58 -0700 Subject: [PATCH] [lldb] Copy the system debugserver in LLDB.framework When using the system debugserver for testing, copy the binary in the LLDB.framework Resource directory instead of the build's bin directory. rdar://82998263 --- lldb/test/API/CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt index 3124ca6..0078984 100644 --- a/lldb/test/API/CMakeLists.txt +++ b/lldb/test/API/CMakeLists.txt @@ -103,10 +103,17 @@ if(CMAKE_HOST_APPLE) if(LLDB_USE_SYSTEM_DEBUGSERVER) lldb_find_system_debugserver(system_debugserver_path) - add_custom_target(debugserver - 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.") + if(LLDB_BUILD_FRAMEWORK) + add_custom_target(debugserver + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${system_debugserver_path} $/Resources + COMMENT "Copying the system debugserver to LLDB.framework's resource directory for testing.") + else() + add_custom_target(debugserver + 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.") + 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) -- 2.7.4