llvm-project/lldb/tools
Stefan Granitz 6e6b4ac18e [CMake] Streamline code signing for debugserver and pass entitlements to extended llvm_codesign
Summary:
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

Reviewers: xiaobai, beanz, vsk, JDevlieghere

Subscribers: mgorny, lldb-commits, llvm-commits

Differential Revision: https://reviews.llvm.org/D54476

llvm-svn: 347305
2018-11-20 14:10:33 +00:00
..
argdumper Introduce lldb-framework CMake target and centralize its logic 2018-06-18 18:27:16 +00:00
compact-unwind *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
darwin-debug Remove comments after header includes. 2018-11-11 23:16:43 +00:00
darwin-threads the thread id is easier to read in base16. 2018-03-06 23:33:02 +00:00
debugserver [CMake] Streamline code signing for debugserver and pass entitlements to extended llvm_codesign 2018-11-20 14:10:33 +00:00
driver Add GDB remote packet reproducer. 2018-11-13 19:18:16 +00:00
install-headers add back an Xcode-specific Makefile for header installation 2016-01-28 22:34:36 +00:00
intel-features Remove header grouping comments. 2018-11-11 23:17:06 +00:00
lldb-mi Remove header grouping comments. 2018-11-11 23:17:06 +00:00
lldb-perf Make lldb -Werror clean for -Wstring-conversion 2017-01-06 00:38:06 +00:00
lldb-server Remove header grouping comments. 2018-11-11 23:17:06 +00:00
lldb-test Remove OCaml debugger plugin 2018-11-05 19:34:03 +00:00
lldb-vscode Add a check whether or not a str is utf8 prior to emplacing 2018-11-15 19:49:57 +00:00
CMakeLists.txt [cmake] Add option to skip building lldb-server 2018-08-23 18:05:45 +00:00