[Lldb-commits] [PATCH] D63745: [CMake] Check that a certificate for lldb is present at build time.

Davide Italiano via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 24 16:46:21 PDT 2019


davide created this revision.
davide added reviewers: JDevlieghere, sgraenitz, aprantl, friss.
Herald added a subscriber: mgorny.
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D63745

Files:
  lldb/CMakeLists.txt


Index: lldb/CMakeLists.txt
===================================================================
--- lldb/CMakeLists.txt
+++ lldb/CMakeLists.txt
@@ -72,6 +72,20 @@
     message(FATAL_ERROR "LLDB test compilers not specified.  Tests will not run")
   endif()
 
+  # On MacOS, debugserver needs to be codesigned. Check if we have a certificate instead
+  # of failing in the middle of the build.
+  if(CMAKE_SYSTEM_NAME MATCHES "Darwin" AND TARGET debugserver)
+    execute_process(
+      COMMAND security find-certificate -Z -p -c lldb_codesign /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")
+    endif()
+  endif()
+
   set(LLDB_TEST_DEPS lldb)
 
   # darwin-debug is an hard dependency for the testsuite.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63745.206330.patch
Type: text/x-patch
Size: 897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190624/c3d02f93/attachment.bin>


More information about the lldb-commits mailing list