[Lldb-commits] [PATCH] D57378: [CMake] Accept entitlements for code signing in add_lldb_library()
Stefan Gränitz via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 29 03:35:06 PST 2019
sgraenitz created this revision.
sgraenitz added reviewers: beanz, JDevlieghere, aprantl.
Herald added a subscriber: mgorny.
D57334 <https://reviews.llvm.org/D57334> added entitlements support in `add_llvm_library()` so we can use it for library targets in LLDB.
Additionally this patch fixes the way that the entitlements argument is passed on from `add_lldb_executable()` to `add_llvm_executable()`. We still need the explicit parsing and passing on of single- and multi-value arguments as long as we are on CMake < 3.7 (due to bug https://gitlab.kitware.com/cmake/cmake/merge_requests/133).
https://reviews.llvm.org/D57378
Files:
cmake/modules/AddLLDB.cmake
Index: cmake/modules/AddLLDB.cmake
===================================================================
--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -3,7 +3,7 @@
# MODULE;SHARED;STATIC library type and source files
cmake_parse_arguments(PARAM
"MODULE;SHARED;STATIC;OBJECT;PLUGIN"
- ""
+ "ENTITLEMENTS"
"EXTRA_CXXFLAGS;DEPENDS;LINK_LIBS;LINK_COMPONENTS"
${ARGN})
llvm_process_sources(srcs ${PARAM_UNPARSED_ARGUMENTS})
@@ -44,6 +44,10 @@
if (PARAM_OBJECT)
add_library(${name} ${libkind} ${srcs})
else()
+ if(PARAM_ENTITLEMENTS)
+ set(pass_ENTITLEMENTS ENTITLEMENTS ${PARAM_ENTITLEMENTS})
+ endif()
+
if(LLDB_NO_INSTALL_DEFAULT_RPATH)
set(pass_NO_INSTALL_RPATH NO_INSTALL_RPATH)
endif()
@@ -51,6 +55,7 @@
llvm_add_library(${name} ${libkind} ${srcs}
LINK_LIBS ${PARAM_LINK_LIBS}
DEPENDS ${PARAM_DEPENDS}
+ ${pass_ENTITLEMENTS}
${pass_NO_INSTALL_RPATH}
)
@@ -106,14 +111,19 @@
${ARGN}
)
+ if(ARG_ENTITLEMENTS)
+ set(pass_ENTITLEMENTS ENTITLEMENTS ${ARG_ENTITLEMENTS})
+ endif()
+
if(LLDB_NO_INSTALL_DEFAULT_RPATH)
set(pass_NO_INSTALL_RPATH NO_INSTALL_RPATH)
endif()
list(APPEND LLVM_LINK_COMPONENTS ${ARG_LINK_COMPONENTS})
- add_llvm_executable(${name} ${ARG_UNPARSED_ARGUMENTS}
- ENTITLEMENTS ${ARG_ENTITLEMENTS}
+ add_llvm_executable(${name}
+ ${pass_ENTITLEMENTS}
${pass_NO_INSTALL_RPATH}
+ ${ARG_UNPARSED_ARGUMENTS}
)
target_link_libraries(${name} PRIVATE ${ARG_LINK_LIBS})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57378.184057.patch
Type: text/x-patch
Size: 1558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190129/830336e0/attachment.bin>
More information about the lldb-commits
mailing list