[PATCH] D44507: [cmake] Copy system debugserver from the right place when only CommandLineTools are installed

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 15 20:34:02 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL327691: [cmake] Copy system debugserver from the right place when only CommandLineTools (authored by vedantk, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D44507

Files:
  lldb/trunk/tools/debugserver/source/CMakeLists.txt


Index: lldb/trunk/tools/debugserver/source/CMakeLists.txt
===================================================================
--- lldb/trunk/tools/debugserver/source/CMakeLists.txt
+++ lldb/trunk/tools/debugserver/source/CMakeLists.txt
@@ -106,8 +106,15 @@
     COMMAND xcode-select -p
     OUTPUT_VARIABLE XCODE_DEV_DIR)
   string(STRIP ${XCODE_DEV_DIR} XCODE_DEV_DIR)
-  set(DEBUGSERVER_PATH
-    "${XCODE_DEV_DIR}/../SharedFrameworks/LLDB.framework/Resources/debugserver" CACHE PATH "Path to debugserver.")
+  if(EXISTS "${XCODE_DEV_DIR}/../SharedFrameworks/LLDB.framework/")
+    set(DEBUGSERVER_PATH
+      "${XCODE_DEV_DIR}/../SharedFrameworks/LLDB.framework/Resources/debugserver" CACHE PATH "Path to debugserver.")
+  elseif(EXISTS "${XCODE_DEV_DIR}/Library/PrivateFrameworks/LLDB.framework/")
+    set(DEBUGSERVER_PATH
+      "${XCODE_DEV_DIR}/Library/PrivateFrameworks/LLDB.framework/Resources/debugserver" CACHE PATH "Path to debugserver.")
+  else()
+    message(SEND_ERROR "Cannot find debugserver on system.")
+  endif()
   set(SKIP_DEBUGSERVER ON CACHE BOOL "Skip building the in-tree debug server")
 endif()
 message(STATUS "Path to the lldb debugserver: ${DEBUGSERVER_PATH}")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44507.138662.patch
Type: text/x-patch
Size: 1193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180316/4e66aed4/attachment.bin>


More information about the llvm-commits mailing list