[PATCH] D55116: [CMake] llvm_codesign polishing
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 5 09:20:24 PST 2018
sgraenitz updated this revision to Diff 176844.
sgraenitz added a comment.
Add --force parameter
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55116/new/
https://reviews.llvm.org/D55116
Files:
cmake/modules/AddLLVM.cmake
Index: cmake/modules/AddLLVM.cmake
===================================================================
--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -580,7 +580,7 @@
if(ARG_SHARED OR ARG_MODULE)
llvm_externalize_debuginfo(${name})
- llvm_codesign(TARGET ${name})
+ llvm_codesign(${name})
endif()
endfunction()
@@ -792,7 +792,7 @@
target_link_libraries(${name} PRIVATE ${LLVM_PTHREAD_LIB})
endif()
- llvm_codesign(TARGET ${name} ENTITLEMENTS ${ARG_ENTITLEMENTS})
+ llvm_codesign(${name} ENTITLEMENTS ${ARG_ENTITLEMENTS})
endmacro(add_llvm_executable name)
function(export_executable_symbols target)
@@ -1628,13 +1628,9 @@
endif()
endfunction()
-# Usage: llvm_codesign(TARGET name [ENTITLEMENTS file])
-#
-# Code-sign the given TARGET with the global LLVM_CODESIGNING_IDENTITY or skip
-# if undefined. Customize capabilities by passing a file path to ENTITLEMENTS.
-#
-function(llvm_codesign)
- cmake_parse_arguments(ARG "" "TARGET;ENTITLEMENTS" "" ${ARGN})
+# Usage: llvm_codesign(name [ENTITLEMENTS file])
+function(llvm_codesign name)
+ cmake_parse_arguments(ARG "" "ENTITLEMENTS" "" ${ARGN})
if(NOT LLVM_CODESIGNING_IDENTITY)
return()
@@ -1652,15 +1648,15 @@
)
endif()
if(DEFINED ARG_ENTITLEMENTS)
- set(PASS_ENTITLEMENTS --entitlements ${ARG_ENTITLEMENTS})
+ set(pass_entitlements --entitlements ${ARG_ENTITLEMENTS})
endif()
add_custom_command(
- TARGET ${ARG_TARGET} POST_BUILD
+ TARGET ${name} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
env CODESIGN_ALLOCATE=${CMAKE_CODESIGN_ALLOCATE}
${CMAKE_CODESIGN} -s ${LLVM_CODESIGNING_IDENTITY}
- ${PASS_ENTITLEMENTS} $<TARGET_FILE:${ARG_TARGET}>
+ ${pass_entitlements} --force $<TARGET_FILE:${name}>
)
endif()
endfunction()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55116.176844.patch
Type: text/x-patch
Size: 1865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181205/eab787b4/attachment.bin>
More information about the llvm-commits
mailing list