[PATCH] D55012: [CMake] Streamline code signing for debugserver #2

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


sgraenitz updated this revision to Diff 175730.
sgraenitz added a comment.

Move code sign settings to LLDBConfig.cmake + polishing


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55012/new/

https://reviews.llvm.org/D55012

Files:
  CMakeLists.txt
  cmake/modules/LLDBConfig.cmake
  tools/debugserver/CMakeLists.txt
  tools/debugserver/source/CMakeLists.txt


Index: tools/debugserver/source/CMakeLists.txt
===================================================================
--- tools/debugserver/source/CMakeLists.txt
+++ tools/debugserver/source/CMakeLists.txt
@@ -142,7 +142,7 @@
   if(CMAKE_HOST_APPLE AND NOT LLVM_CODESIGNING_IDENTITY STREQUAL "lldb_codesign")
     set(msg "Cannot code sign debugserver with identity '${LLVM_CODESIGNING_IDENTITY}'.")
     if(system_debugserver)
-      message(WARNING "${msg} Will fall back to system's debugserver.")
+      message(WARNING "${msg} Will fall back to copy system's debugserver.")
       set(use_system_debugserver ON)
     else()
       message(WARNING "${msg} debugserver will not be available.")
Index: tools/debugserver/CMakeLists.txt
===================================================================
--- tools/debugserver/CMakeLists.txt
+++ tools/debugserver/CMakeLists.txt
@@ -15,7 +15,7 @@
   set(LLDB_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../../")
   include_directories(${LLDB_SOURCE_DIR}/include)
 
-  option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON)
+  option(LLDB_USE_ENTITLEMENTS "When code signing, use entitlements if available" ON)
   set(LLDB_CODESIGN_IDENTITY lldb_codesign CACHE STRING
       "Identity for code signing debugserver (Darwin only)")
 
Index: cmake/modules/LLDBConfig.cmake
===================================================================
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -50,6 +50,14 @@
   add_definitions( -DLLDB_DISABLE_CURSES )
 endif()
 
+option(LLDB_USE_ENTITLEMENTS "When code signing, use entitlements if available" ON)
+set(LLDB_CODESIGN_IDENTITY lldb_codesign CACHE STRING
+    "Identity for code signing debugserver (Darwin only)")
+
+if(LLDB_CODESIGN_IDENTITY)
+  set(LLVM_CODESIGNING_IDENTITY ${LLDB_CODESIGN_IDENTITY} CACHE STRING "" FORCE)
+endif()
+
 # On Windows, we can't use the normal FindPythonLibs module that comes with CMake,
 # for a number of reasons.
 # 1) Prior to MSVC 2015, it is only possible to embed Python if python itself was
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -11,14 +11,6 @@
 include(LLDBConfig)
 include(AddLLDB)
 
-option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON)
-set(LLDB_CODESIGN_IDENTITY lldb_codesign CACHE STRING
-    "Identity for code signing debugserver (Darwin only)")
-
-if(LLDB_CODESIGN_IDENTITY)
-  set(LLVM_CODESIGNING_IDENTITY ${LLDB_CODESIGN_IDENTITY} CACHE STRING "" FORCE)
-endif()
-
 # Define the LLDB_CONFIGURATION_xxx matching the build type
 if( uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
   add_definitions( -DLLDB_CONFIGURATION_DEBUG )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55012.175730.patch
Type: text/x-patch
Size: 2733 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181128/08126cd9/attachment.bin>


More information about the llvm-commits mailing list