forked from OSchip/llvm-project
[lldb] Code sign binaries with entitlements
Binaries need to be code signed with entitlements to run on device. Differential revision: https://reviews.llvm.org/D86237
This commit is contained in:
parent
76bf26236f
commit
b40a3814b6
|
@ -1,4 +1,5 @@
|
|||
import re
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from .builder import Builder
|
||||
|
@ -53,9 +54,12 @@ class BuilderDarwin(Builder):
|
|||
if configuration.dsymutil:
|
||||
args['DSYMUTIL'] = configuration.dsymutil
|
||||
|
||||
os, _ = self.getOsAndEnv()
|
||||
if os and os != "macosx":
|
||||
args['CODESIGN'] = 'codesign'
|
||||
operating_system, _ = self.getOsAndEnv()
|
||||
if operating_system and operating_system != "macosx":
|
||||
builder_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
test_dir = os.path.dirname(builder_dir)
|
||||
entitlements = os.path.join(test_dir, 'make', 'entitlements.plist')
|
||||
args['CODESIGN'] = 'codesign --entitlements {}'.format(entitlements)
|
||||
|
||||
# Return extra args as a formatted string.
|
||||
return ' '.join(
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.get-task-allow</key>
|
||||
<true/>
|
||||
<key>com.apple.private.security.no-sandbox</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
Loading…
Reference in New Issue