diff options
| author | Davide Italiano <davide@freebsd.org> | 2019-06-25 17:13:24 +0000 |
|---|---|---|
| committer | Davide Italiano <davide@freebsd.org> | 2019-06-25 17:13:24 +0000 |
| commit | 97017a8ef9c9f0388aea51d368bfb0b360f54704 (patch) | |
| tree | 5c2f82df8efe5df53e74455a9a4f5385ebc9747f /lldb/tools/debugserver | |
| parent | 14ea14ae8599a90e228a12349a5ab2b14e8b4d1f (diff) | |
| download | bcm5719-llvm-97017a8ef9c9f0388aea51d368bfb0b360f54704.tar.gz bcm5719-llvm-97017a8ef9c9f0388aea51d368bfb0b360f54704.zip | |
[CMake] Check that a certificate for lldb is present at build time.
Reviewers: JDevlieghere, sgraenitz, aprantl, friss
Subscribers: mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D63745
llvm-svn: 364334
Diffstat (limited to 'lldb/tools/debugserver')
| -rw-r--r-- | lldb/tools/debugserver/source/CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt index d63dc23ef3b..863afaaecfb 100644 --- a/lldb/tools/debugserver/source/CMakeLists.txt +++ b/lldb/tools/debugserver/source/CMakeLists.txt @@ -142,6 +142,21 @@ else() message(STATUS "lldb debugserver will not be available.") endif() +# On MacOS, debugserver needs to be codesigned when built. Check if we have +# a certificate instead of failing in the middle of the build. +if(build_and_sign_debugserver) + execute_process( + COMMAND security find-certificate -Z -p -c ${LLDB_CODESIGN_IDENTITY_USED} /Library/Keychains/System.keychain + RESULT_VARIABLE cert_return + OUTPUT_QUIET + ERROR_QUIET) + + if (cert_return) + message(FATAL_ERROR "Certificate for debugserver not found. Run scripts/macos-setup-codesign.sh or " + "use the system debugserver passing -DLLDB_USE_SYSTEM_DEBUGSERVER=ON to CMake") + endif() +endif() + if(APPLE) if(IOS) find_library(BACKBOARD_LIBRARY BackBoardServices |

