diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2020-08-19 10:19:03 -0700 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2020-08-19 11:55:36 -0700 |
commit | b40a3814b6fd0c784b52622eddac56d7c321d7cc (patch) | |
tree | 2f528de832bdd15db723de93e3bd8bac746a9c9b | |
parent | 76bf26236f6fd453343666c3cd91de8f74ffd89d (diff) | |
download | llvm-b40a3814b6fd0c784b52622eddac56d7c321d7cc.zip llvm-b40a3814b6fd0c784b52622eddac56d7c321d7cc.tar.gz llvm-b40a3814b6fd0c784b52622eddac56d7c321d7cc.tar.bz2 |
[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
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/builders/darwin.py | 10 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/make/entitlements.plist | 10 |
2 files changed, 17 insertions, 3 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/builders/darwin.py b/lldb/packages/Python/lldbsuite/test/builders/darwin.py index 704897d..470ea5d 100644 --- a/lldb/packages/Python/lldbsuite/test/builders/darwin.py +++ b/lldb/packages/Python/lldbsuite/test/builders/darwin.py @@ -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( diff --git a/lldb/packages/Python/lldbsuite/test/make/entitlements.plist b/lldb/packages/Python/lldbsuite/test/make/entitlements.plist new file mode 100644 index 0000000..3c009ffa --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/make/entitlements.plist @@ -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> |