Author: davide Date: Tue Jun 25 10:13:24 2019 New Revision: 364334 URL: http://llvm.org/viewvc/llvm-project?rev=364334&view=rev Log: [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 Modified: lldb/trunk/tools/debugserver/source/CMakeLists.txt Modified: lldb/trunk/tools/debugserver/source/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/CMakeLists.txt?rev=364334&r1=364333&r2=364334&view=diff ============================================================================== --- lldb/trunk/tools/debugserver/source/CMakeLists.txt (original) +++ lldb/trunk/tools/debugserver/source/CMakeLists.txt Tue Jun 25 10:13:24 2019 @@ -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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits