xiaobai created this revision. xiaobai added reviewers: vsk, beanz. Herald added a subscriber: mgorny.
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. https://reviews.llvm.org/D44507 Files: tools/debugserver/source/CMakeLists.txt Index: tools/debugserver/source/CMakeLists.txt =================================================================== --- tools/debugserver/source/CMakeLists.txt +++ 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}")
Index: tools/debugserver/source/CMakeLists.txt =================================================================== --- tools/debugserver/source/CMakeLists.txt +++ 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}")
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits