[Lldb-commits] [PATCH] D42215: [CMake] Make check-lldb work with LLDB_CODESIGN_IDENTITY=''
Phabricator via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jan 17 17:18:51 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL322803: [CMake] Make check-lldb work with LLDB_CODESIGN_IDENTITY='' (authored by vedantk, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D42215?vs=130325&id=130332#toc
Repository:
rL LLVM
https://reviews.llvm.org/D42215
Files:
lldb/trunk/docs/code-signing.txt
lldb/trunk/test/CMakeLists.txt
Index: lldb/trunk/docs/code-signing.txt
===================================================================
--- lldb/trunk/docs/code-signing.txt
+++ lldb/trunk/docs/code-signing.txt
@@ -1,6 +1,11 @@
-On MacOSX lldb needs to be code signed. The Debug, DebugClang and Release
-builds are set to code sign using a code signing certificate named
-"lldb_codesign".
+To use the in-tree debug server on macOS, lldb needs to be code signed. The
+Debug, DebugClang and Release builds are set to code sign using a code signing
+certificate named "lldb_codesign". This document explains how to set up the
+signing certificate.
+
+Note that it's possible to build and use lldb on macOS without setting up code
+signing by using the system's debug server. To configure lldb in this way with
+cmake, specify -DLLDB_CODESIGN_IDENTITY=''.
If you have re-installed a new OS, please delete all old lldb_codesign items
from your keychain. There will be a code signing certification and a public
Index: lldb/trunk/test/CMakeLists.txt
===================================================================
--- lldb/trunk/test/CMakeLists.txt
+++ lldb/trunk/test/CMakeLists.txt
@@ -25,7 +25,9 @@
endif()
if(TARGET debugserver)
- list(APPEND LLDB_TEST_DEPS debugserver)
+ if(NOT CMAKE_HOST_APPLE OR LLDB_CODESIGN_IDENTITY)
+ list(APPEND LLDB_TEST_DEPS debugserver)
+ endif()
endif()
if(TARGET lldb-mi)
@@ -95,7 +97,18 @@
endif()
if(CMAKE_HOST_APPLE)
- list(APPEND LLDB_TEST_COMMON_ARGS --server $<TARGET_FILE:debugserver>)
+ if(LLDB_CODESIGN_IDENTITY)
+ set(DEBUGSERVER_PATH $<TARGET_FILE:debugserver>)
+ else()
+ execute_process(
+ 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")
+ endif()
+ message(STATUS "Path to the lldb debugserver: ${DEBUGSERVER_PATH}")
+ list(APPEND LLDB_TEST_COMMON_ARGS --server ${DEBUGSERVER_PATH})
endif()
set(LLDB_DOTEST_ARGS ${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42215.130332.patch
Type: text/x-patch
Size: 2101 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180118/bc51b339/attachment.bin>
More information about the lldb-commits
mailing list