[Lldb-commits] [PATCH] D46334: [lit] Make debugserver available to lit test

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 1 15:05:01 PDT 2018


JDevlieghere created this revision.
JDevlieghere added reviewers: stella.stamenova, zturner, davide.
Herald added subscribers: jkorous, mgorny.

Because we can't expand generator expressions for the lit tests, we need to set the path to the debugserver in the `_STR` variable so it's expanded properly without breaking multi-target generators such as MSVC and Xcode.


Repository:
  rL LLVM

https://reviews.llvm.org/D46334

Files:
  test/CMakeLists.txt


Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -134,11 +134,13 @@
     --env ARCHIVER=${CMAKE_AR} --env OBJCOPY=${CMAKE_OBJCOPY})
 endif()
 
-# In some cases, DEBUGSERVER_PATH is expressed as $<TARGET_FILE:debugserver>. This won't work in the
-# LLDB_DOTEST_ARGS_STR when using a generator that supports multiple configurations such as Visual Studio,
-# but since debugserver is currently confined to Darwin/Apple, we can leave it as is.
 if(CMAKE_HOST_APPLE)
-  list(APPEND LLDB_TEST_COMMON_ARGS --server ${DEBUGSERVER_PATH})
+  if (DEBUGSERVER_PATH STREQUAL "$<TARGET_FILE:debugserver>")
+    list(APPEND LLDB_EXECUTABLE_PATH_ARGS --server ${DEBUGSERVER_PATH})
+    list(APPEND LLDB_EXECUTABLE_PATH_ARGS_STR --server ${LLVM_RUNTIME_OUTPUT_INTDIR}/debugserver${CMAKE_EXECUTABLE_SUFFIX})
+  else()
+    list(APPEND LLDB_TEST_COMMON_ARGS --server ${DEBUGSERVER_PATH})
+  endif()
 endif()
 
 if(SKIP_DEBUGSERVER)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46334.144797.patch
Type: text/x-patch
Size: 1010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180501/f2a74e96/attachment.bin>


More information about the lldb-commits mailing list