[PATCH] D54352: [CMake] Explicit lldb_codesign function with application in debugserver and lldb-server

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 12 04:15:54 PST 2018


sgraenitz added a comment.

Yes, considered it, but was not sure whether it's a good idea to bloat the general mechanism in LLVM to match the requirements for a single subproject. Do you think other projects would benefit from it?

My reasoning was: Passing through target-specific parameters to llvm_codesign is not simple as it runs "implicitly" as part of add_llvm_executable/library. In order to align with its current approach, entitlements had to be set in a global variable (like LLVM_CODESIGNING_IDENTITY) beforehand. Furthermore, we want to avoid entitlements to be used for yet another target, so we had to unset it afterwards. The conditions that determine the correct entitlements for each situation seem to be complicated already. Not sure if that's a good combination.

OTOH, if we are in favour of a unified implementation, it would be great to encapsulate the details and write something like:

  add_lldb_tool(target
    ${sources}
  
    LINK_LIBS
      ${libs}
  
    ENTITLEMENTS
      ${entitlements}
  )

I think this would still require quite some additions to llvm_codesign. I went with the simpler version for now. What do you think?


https://reviews.llvm.org/D54352





More information about the llvm-commits mailing list