[Lldb-commits] [PATCH] D86237: [lldb] Code sign binaries with entitlements

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 19 11:55:49 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGb40a3814b6fd: [lldb] Code sign binaries with entitlements (authored by JDevlieghere).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86237/new/

https://reviews.llvm.org/D86237

Files:
  lldb/packages/Python/lldbsuite/test/builders/darwin.py
  lldb/packages/Python/lldbsuite/test/make/entitlements.plist


Index: lldb/packages/Python/lldbsuite/test/make/entitlements.plist
===================================================================
--- /dev/null
+++ 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>
Index: lldb/packages/Python/lldbsuite/test/builders/darwin.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/builders/darwin.py
+++ 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 @@
         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(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86237.286628.patch
Type: text/x-patch
Size: 1596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200819/e8b06ebb/attachment.bin>


More information about the lldb-commits mailing list