Page MenuHomePhabricator

[CMake] Use extended llvm_codesign to pass entitlements for lldb-server

Authored by sgraenitz on Nov 12 2018, 1:08 PM.



Use llvm_codesign from to sign lldb-server with entitlements.

Event Timeline

sgraenitz created this revision.Nov 12 2018, 1:08 PM

debugserver was not that simple. For now only lldb-server as an example.


I am parsing ENTITLEMENTS above and passing it on here explicitly. Had expected it to be passed along with ARG_UNPARSED_ARGUMENTS otherwise, but for some reason that didn't work. Is that the expected behaviour?

sgraenitz added inline comments.Nov 13 2018, 3:33 AM

TODO: Fix comment "debugserver"

sgraenitz updated this revision to Diff 173849.Nov 13 2018, 7:11 AM

unset not necessary, fix comment, globally set LLVM_CODESIGNING_IDENTITY from LLDB_CODESIGN_IDENTITY

sgraenitz marked an inline comment as done.Nov 13 2018, 7:12 AM
sgraenitz edited the summary of this revision. (Show Details)Nov 14 2018, 10:00 AM
sgraenitz added subscribers: JDevlieghere, vsk, aprantl.

Why does lldb-server need to be signed? I was under the impression that on macOS lldb-server is not used? Or are we building it for testing and need sign it because of that?

In Xcode we have ad-hoc signing when targeting iOS and signing with entitlements in case of macOS for lldb-server.

+ LLDB.framework has lldb-server as a dependency there. Not sure if it's (really) necessary, though.

We do use lldb-server, though only in the platform mode, for remote testsuite running. The gdbserver mode doesn't do anything for a macOS hosted lldb-server, so lldb-server should not require any entitlements. But we do use it.

sgraenitz abandoned this revision.Nov 16 2018, 10:51 AM

Ok, I will close this then. Added the remaining part of the patch to