summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-03-16 03:31:16 +0000
committerVedant Kumar <vsk@apple.com>2018-03-16 03:31:16 +0000
commit51bc20527beeee414f2ce55fa2671e7ac8eee466 (patch)
tree2c5770f58f718ccceb7a2f13c6657fafff0f9369
parente9c2a3c5651d9147d6ea74eeee977bd1fe94d39a (diff)
downloadbcm5719-llvm-51bc20527beeee414f2ce55fa2671e7ac8eee466.tar.gz
bcm5719-llvm-51bc20527beeee414f2ce55fa2671e7ac8eee466.zip
[cmake] Copy system debugserver from the right place when only CommandLineTools
are installed Instead of building debugserver when building lldb, I'd rather pass LLDB_CODESIGN_IDENTITY="" to cmake and use the one already on my system. However, on one of my machines I only have the CommandLineTools installed, and so the hardcoded path to the system debugserver does not work for me. Additionally, we should verify the LLDB framework exists on the machine before trying to set the path to debugserver. This allows us to warn the user at configure time that a system debugserver can't be found if they choose not to build it themselves. Patch by Alex Langford! Differential Revision: https://reviews.llvm.org/D44507 llvm-svn: 327691
-rw-r--r--lldb/tools/debugserver/source/CMakeLists.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt
index 63d3dc974dc..68c790ee654 100644
--- a/lldb/tools/debugserver/source/CMakeLists.txt
+++ b/lldb/tools/debugserver/source/CMakeLists.txt
@@ -106,8 +106,15 @@ else()
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}")
OpenPOWER on IntegriCloud