Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: tools/tools.gyp

Issue 822533002: generate_dump, exception_port_tool: set SecTaskAccess allowed (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/mac/sectaskaccess_info.plist ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/tools.gyp
diff --git a/tools/tools.gyp b/tools/tools.gyp
index fdcbd0192b3e86fa91e7563bade6de386a00526b..e3e2fb037819add0062304bad6a448970a0c3276 100644
--- a/tools/tools.gyp
+++ b/tools/tools.gyp
@@ -15,6 +15,33 @@
{
'conditions': [
['OS=="mac"', {
+ 'variables': {
+ # Programs that use task_for_pid() can indicate to taskgated(8) in their
+ # Info.plist that they are allowed to call that function. In order for
+ # this to work, the programs in question must be signed by an authority
+ # trusted by the system. Signing is beyond the scope of the build, but
+ # the key to make this work is placed in Info.plist to enable the
+ # desired behavior once the tools that require this access are signed.
+ #
+ # The tools built here are flat-file executables, and are not bundled.
+ # To have an Info.plist, they must have a special __TEXT,__info_plist
+ # section. This section is created at link time.
+ #
+ # The Info.plist for this purpose is mac/sectaskaccess_info.plist and is
+ # referenced by OTHER_LDFLAGS. ninja runs the link step from the output
+ # directory such as out/Release, and requires a relative path from that
+ # directory. Xcode runs the link step from the directory of the
+ # .xcodeproj, which is the directory of the .gyp file.
+ 'conditions': [
+ ['GENERATOR=="ninja"', {
+ 'sectaskaccess_info_plist':
+ '../../tools/mac/sectaskaccess_info.plist',
+ }, { # else: GENERATOR!="ninja"
+ 'sectaskaccess_info_plist': 'mac/sectaskaccess_info.plist',
+ }],
+ ],
+ },
+
'targets': [
{
'target_name': 'tool_support',
@@ -61,6 +88,14 @@
'sources': [
'mac/exception_port_tool.cc',
],
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-sectcreate',
+ '__TEXT',
+ '__info_plist',
+ '<(sectaskaccess_info_plist)'
+ ],
+ },
},
{
'target_name': 'generate_dump',
@@ -79,6 +114,14 @@
'sources': [
'generate_dump.cc',
],
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-sectcreate',
+ '__TEXT',
+ '__info_plist',
+ '<(sectaskaccess_info_plist)'
+ ],
+ },
},
{
'target_name': 'on_demand_service_tool',
« no previous file with comments | « tools/mac/sectaskaccess_info.plist ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698