1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
8 'target_name': 'sandbox',
9 'type': '<(component)',
11 'bootstrap_sandbox.cc',
12 'bootstrap_sandbox.h',
13 'dispatch_source_mach.cc',
14 'dispatch_source_mach.h',
15 'launchd_interception_server.cc',
16 'launchd_interception_server.h',
17 'mach_message_server.cc',
18 'mach_message_server.h',
20 'os_compatibility.cc',
26 'xpc_message_server.cc',
27 'xpc_message_server.h',
30 '../base/base.gyp:base',
34 '<(SHARED_INTERMEDIATE_DIR)',
37 'SANDBOX_IMPLEMENTATION',
41 '$(SDKROOT)/usr/lib/libbsm.dylib',
45 # When the build SDK is 10.6, generate a dynamic stub loader. When the
46 # SDK is higher, then libxpc.dylib will be loaded automatically as part
47 # of libSystem, and only forward declarations of private symbols are
49 ['mac_sdk == "10.6"', {
53 'generate_stubs_script': '../tools/generate_stubs/generate_stubs.py',
54 'generate_stubs_header_path': 'xpc_stubs_header.fragment',
55 'generate_stubs_sig_public_path': 'xpc_stubs.sig',
56 'generate_stubs_sig_private_path': 'xpc_private_stubs.sig',
57 'generate_stubs_project': 'sandbox/mac',
58 'generate_stubs_output_stem': 'xpc_stubs',
60 'action_name': 'generate_stubs',
62 '<(generate_stubs_script)',
63 '<(generate_stubs_header_path)',
64 '<(generate_stubs_sig_public_path)',
65 '<(generate_stubs_sig_private_path)',
68 '<(INTERMEDIATE_DIR)/<(generate_stubs_output_stem).cc',
69 '<(SHARED_INTERMEDIATE_DIR)/<(generate_stubs_project)/<(generate_stubs_output_stem).h',
73 '<(generate_stubs_script)',
74 '-i', '<(INTERMEDIATE_DIR)',
75 '-o', '<(SHARED_INTERMEDIATE_DIR)/<(generate_stubs_project)',
77 '-e', '<(generate_stubs_header_path)',
78 '-s', '<(generate_stubs_output_stem)',
79 '-p', '<(generate_stubs_project)',
80 '-x', 'SANDBOX_EXPORT',
81 '<(generate_stubs_sig_public_path)',
82 '<(generate_stubs_sig_private_path)',
84 'process_outputs_as_sources': 1,
85 'message': 'Generating XPC stubs for 10.6 compatability.',
92 'target_name': 'sandbox_mac_unittests',
95 'bootstrap_sandbox_unittest.mm',
96 'dispatch_source_mach_unittest.cc',
98 'xpc_message_server_unittest.cc',
102 '../base/base.gyp:base',
103 '../base/base.gyp:run_all_unittests',
104 '../testing/gtest.gyp:gtest',
111 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
112 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',