diff options
| author | Stefan Granitz <stefan.graenitz@gmail.com> | 2019-01-04 12:46:30 +0000 |
|---|---|---|
| committer | Stefan Granitz <stefan.graenitz@gmail.com> | 2019-01-04 12:46:30 +0000 |
| commit | 90aeb4c8d9835d31c4247bb92ca63ed153907d50 (patch) | |
| tree | 89dd1d0aa4efc863ef8b45f14c1663ca97379c59 /lldb/test | |
| parent | 7bec693433ee61728ca6841b3210f08d1559f183 (diff) | |
| download | bcm5719-llvm-90aeb4c8d9835d31c4247bb92ca63ed153907d50.tar.gz bcm5719-llvm-90aeb4c8d9835d31c4247bb92ca63ed153907d50.zip | |
[CMake] Streamline code signing for debugserver #2
Summary:
Major fixes after D54476 (use Diff1 as base for comparison to see only recent changes):
* In standalone builds target directory for debugserver must be LLDB's bin, not LLVM's bin
* Default identity for code signing must not force-override LLVM_CODESIGNING_IDENTITY globally
We have a lot of cases, make them explicit:
* ID used for code signing (debugserver and in tests):
** `LLDB_CODESIGN_IDENTITY` if set explicitly, or otherwise
** `LLVM_CODESIGNING_IDENTITY` if set explicitly, or otherwise
** `lldb_codesign` as the default
* On Darwin we have a debugserver target that:
* On other systems, the debugserver target is not defined, which is equivalent to **[3A]**
Common configurations on Darwin:
* **[1A]** `cmake -GNinja ../llvm` builds debugserver from source and signs with `lldb_codesign`, no code signing for other binaries (prints status: //lldb debugserver: /path/to/bin/debugserver//)
* **[1A]** `cmake -GNinja -DLLVM_CODESIGNING_IDENTITY=- -DLLDB_CODESIGN_IDENTITY=lldb_codesign ../llvm` builds debugserver from source and signs with `lldb_codesign`, ad-hoc code signing for other binaries (prints status: //lldb debugserver: /path/to/bin/debugserver//)
* **[2A]** `cmake -GNinja -DLLVM_CODESIGNING_IDENTITY=- -DLLDB_USE_SYSTEM_DEBUGSERVER=ON ../llvm` copies debugserver from system, ad-hoc code signing for other binaries (prints status: //Copy system debugserver from: /path/to/system/debugserver//)
* **[2B]** `cmake -GNinja -DLLVM_CODESIGNING_IDENTITY=- ../llvm` same, but prints additional warning: //Cannot code sign debugserver with identity '-'. Will fall back to system's debugserver. Pass -DLLDB_CODESIGN_IDENTITY=lldb_codesign to override the LLVM value for debugserver.//
* **[3A]** `cmake -GNinja -DLLVM_CODESIGNING_IDENTITY=- -DLLDB_NO_DEBUGSERVER=ON ../llvm` debugserver not available (prints status: //lldb debugserver will not be available)//
Reviewers: JDevlieghere, beanz, davide, vsk, aprantl, labath
Reviewed By: JDevlieghere, labath
Subscribers: mgorny, #lldb, lldb-commits
Differential Revision: https://reviews.llvm.org/D55013
llvm-svn: 350388
Diffstat (limited to 'lldb/test')
| -rw-r--r-- | lldb/test/CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt index bf7b21e5d87..2efd99acc44 100644 --- a/lldb/test/CMakeLists.txt +++ b/lldb/test/CMakeLists.txt @@ -74,8 +74,8 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) endif() endif() -if(LLDB_CODESIGN_IDENTITY) - list(APPEND LLDB_TEST_COMMON_ARGS --codesign-identity "${LLDB_CODESIGN_IDENTITY}") +if(LLDB_CODESIGN_IDENTITY_USED) + list(APPEND LLDB_TEST_COMMON_ARGS --codesign-identity "${LLDB_CODESIGN_IDENTITY_USED}") endif() if(LLDB_BUILD_FRAMEWORK) @@ -93,11 +93,11 @@ if (NOT "${LLDB_LIT_TOOLS_DIR}" STREQUAL "") endif() endif() -if(CMAKE_HOST_APPLE) +if(CMAKE_HOST_APPLE AND DEBUGSERVER_PATH) list(APPEND LLDB_TEST_COMMON_ARGS --server ${DEBUGSERVER_PATH}) endif() -if(SKIP_DEBUGSERVER) +if(SKIP_TEST_DEBUGSERVER) list(APPEND LLDB_TEST_COMMON_ARGS --out-of-tree-debugserver) endif() |

