Author: Jonas Devlieghere
Date: 2021-09-24T15:07:22-07:00
New Revision: c6288759296f808a2f7304bbd1bd5b18974e4ccc

URL: 
https://github.com/llvm/llvm-project/commit/c6288759296f808a2f7304bbd1bd5b18974e4ccc
DIFF: 
https://github.com/llvm/llvm-project/commit/c6288759296f808a2f7304bbd1bd5b18974e4ccc.diff

LOG: [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

Added: 
    

Modified: 
    lldb/test/API/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt
index 3124ca602e8e3..0078984c46b23 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_
diff erent
-      ${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_
diff erent
+        ${system_debugserver_path} $<TARGET_FILE_DIR:liblldb>/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_
diff erent
+        ${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)


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to