[Lldb-commits] [PATCH] D55013: [CMake] Streamline code signing for debugserver #2

Stefan Gränitz via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 28 11:35:06 PST 2018


sgraenitz created this revision.
Herald added a subscriber: mgorny.

The first patch had to be reverted as I missed a few details. This review continues from D54476 <https://reviews.llvm.org/D54476> and I will add the required fixes.

Change log:

- Use llvm_codesign to sign debugserver with entitlements.
- Set global LLVM_CODESIGNING_IDENTITY from LLDB_CODESIGN_IDENTITY (if given).
- Pass through ENTITLEMENTS from add_lldb_executable to add_llvm_executable.
- Handle reconfigurations correctly.

We have a lot of cases, make them explicit:

(1) build and sign debugserver, if all conditions apply:

- LLDB_NO_DEBUGSERVER=OFF (default)
- On Darwin: LLDB_USE_SYSTEM_DEBUGSERVER=OFF (default)
- On Darwin: LLVM_CODESIGNING_IDENTITY == lldb_codesign

(2) use system debugserver, if on Darwin and any of:

- LLDB_USE_SYSTEM_DEBUGSERVER=ON and found on system (explicit case)
- LLVM_CODESIGNING_IDENTITY != lldb_codesign and found on system (fallback case)

(3) debugserver will not be available, in case of:

- LLDB_NO_DEBUGSERVER=ON
- On Darwin: LLVM_CODESIGNING_IDENTITY != lldb_codesign and not found on system

(4) error state, in case of:

- LLDB_USE_SYSTEM_DEBUGSERVER=ON and not found on system
- LLDB_USE_SYSTEM_DEBUGSERVER=ON and LLDB_NO_DEBUGSERVER=ON


https://reviews.llvm.org/D55013

Files:
  CMakeLists.txt
  cmake/modules/AddLLDB.cmake
  test/CMakeLists.txt
  tools/debugserver/CMakeLists.txt
  tools/debugserver/source/CMakeLists.txt
  unittests/tools/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55013.175732.patch
Type: text/x-patch
Size: 11873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181128/0d084a0a/attachment-0001.bin>


More information about the lldb-commits mailing list