[PATCH] D62693: Support codesigning bundles and forcing
Phabricator via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 30 15:26:21 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL362169: Support codesigning bundles and forcing (authored by cbieneman, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D62693?vs=202239&id=202320#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62693/new/
https://reviews.llvm.org/D62693
Files:
clang-tools-extra/trunk/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake
llvm/trunk/cmake/modules/AddLLVM.cmake
Index: clang-tools-extra/trunk/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake
===================================================================
--- clang-tools-extra/trunk/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake
+++ clang-tools-extra/trunk/clangd/xpc/cmake/modules/CreateClangdXPCFramework.cmake
@@ -70,4 +70,9 @@
${target}
${CLANGD_FRAMEWORK_LOCATION}
)
+
+ # clangd is already signed as a standalone executable, so it must be forced.
+ llvm_codesign(ClangdXPC BUNDLE_PATH "${CLANGD_FRAMEWORK_OUT_LOCATION}/XPCServices/${CLANGD_XPC_SERVICE_NAME}.xpc/" FORCE)
+ # ClangdXPC library is already signed as a standalone library, so it must be forced.
+ llvm_codesign(ClangdXPC BUNDLE_PATH "${CLANGD_FRAMEWORK_LOCATION}" FORCE)
endmacro(create_clangd_xpc_framework)
Index: llvm/trunk/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake
+++ llvm/trunk/cmake/modules/AddLLVM.cmake
@@ -1659,9 +1659,9 @@
endif()
endfunction()
-# Usage: llvm_codesign(name [ENTITLEMENTS file])
+# Usage: llvm_codesign(name [FORCE] [ENTITLEMENTS file] [BUNDLE_PATH path])
function(llvm_codesign name)
- cmake_parse_arguments(ARG "" "ENTITLEMENTS" "" ${ARGN})
+ cmake_parse_arguments(ARG "FORCE" "ENTITLEMENTS;BUNDLE_PATH" "" ${ARGN})
if(NOT LLVM_CODESIGNING_IDENTITY)
return()
@@ -1691,12 +1691,20 @@
set(pass_entitlements --entitlements ${ARG_ENTITLEMENTS})
endif()
+ if (NOT ARG_BUNDLE_PATH)
+ set(ARG_BUNDLE_PATH $<TARGET_FILE:${name}>)
+ endif()
+
+ if(ARG_FORCE)
+ set(force_flag "-f")
+ endif()
+
add_custom_command(
TARGET ${name} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
env CODESIGN_ALLOCATE=${CMAKE_CODESIGN_ALLOCATE}
${CMAKE_CODESIGN} -s ${LLVM_CODESIGNING_IDENTITY}
- ${pass_entitlements} $<TARGET_FILE:${name}>
+ ${pass_entitlements} ${force_flag} ${ARG_BUNDLE_PATH}
)
endif()
endfunction()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62693.202320.patch
Type: text/x-patch
Size: 2046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190530/7f4b1acc/attachment.bin>
More information about the cfe-commits
mailing list