Add ICU message format support
[chromium-blink-merge.git] / sandbox / win / sandbox_win.gypi
blobb3b70bda222010560b0345c78e083fae88d6ccc4
1 # Copyright (c) 2012 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.
6   'target_defaults': {
7     'variables': {
8       'sandbox_windows_target': 0,
9       'target_arch%': 'ia32',
10     },
11     'target_conditions': [
12       ['sandbox_windows_target==1', {
13         # Files that are shared between the 32-bit and the 64-bit versions
14         # of the Windows sandbox library.
15         'sources': [
16             'src/acl.cc',
17             'src/acl.h',
18             'src/app_container.cc',
19             'src/app_container.h',
20             'src/broker_services.cc',
21             'src/broker_services.h',
22             'src/crosscall_client.h',
23             'src/crosscall_params.h',
24             'src/crosscall_server.cc',
25             'src/crosscall_server.h',
26             'src/eat_resolver.cc',
27             'src/eat_resolver.h',
28             'src/filesystem_dispatcher.cc',
29             'src/filesystem_dispatcher.h',
30             'src/filesystem_interception.cc',
31             'src/filesystem_interception.h',
32             'src/filesystem_policy.cc',
33             'src/filesystem_policy.h',
34             'src/handle_closer.cc',
35             'src/handle_closer.h',
36             'src/handle_closer_agent.cc',
37             'src/handle_closer_agent.h',
38             'src/handle_dispatcher.cc',
39             'src/handle_dispatcher.h',
40             'src/handle_interception.cc',
41             'src/handle_interception.h',
42             'src/handle_policy.cc',
43             'src/handle_policy.h',
44             'src/interception.cc',
45             'src/interception.h',
46             'src/interception_agent.cc',
47             'src/interception_agent.h',
48             'src/interception_internal.h',
49             'src/interceptors.h',
50             'src/internal_types.h',
51             'src/ipc_tags.h',
52             'src/job.cc',
53             'src/job.h',
54             'src/named_pipe_dispatcher.cc',
55             'src/named_pipe_dispatcher.h',
56             'src/named_pipe_interception.cc',
57             'src/named_pipe_interception.h',
58             'src/named_pipe_policy.cc',
59             'src/named_pipe_policy.h',
60             'src/nt_internals.h',
61             'src/policy_broker.cc',
62             'src/policy_broker.h',
63             'src/policy_engine_opcodes.cc',
64             'src/policy_engine_opcodes.h',
65             'src/policy_engine_params.h',
66             'src/policy_engine_processor.cc',
67             'src/policy_engine_processor.h',
68             'src/policy_low_level.cc',
69             'src/policy_low_level.h',
70             'src/policy_params.h',
71             'src/policy_target.cc',
72             'src/policy_target.h',
73             'src/process_mitigations.cc',
74             'src/process_mitigations.h',
75             'src/process_mitigations_win32k_dispatcher.cc',
76             'src/process_mitigations_win32k_dispatcher.h',
77             'src/process_mitigations_win32k_interception.cc',
78             'src/process_mitigations_win32k_interception.h',
79             'src/process_mitigations_win32k_policy.cc',
80             'src/process_mitigations_win32k_policy.h',
81             'src/process_thread_dispatcher.cc',
82             'src/process_thread_dispatcher.h',
83             'src/process_thread_interception.cc',
84             'src/process_thread_interception.h',
85             'src/process_thread_policy.cc',
86             'src/process_thread_policy.h',
87             'src/registry_dispatcher.cc',
88             'src/registry_dispatcher.h',
89             'src/registry_interception.cc',
90             'src/registry_interception.h',
91             'src/registry_policy.cc',
92             'src/registry_policy.h',
93             'src/resolver.cc',
94             'src/resolver.h',
95             'src/restricted_token_utils.cc',
96             'src/restricted_token_utils.h',
97             'src/restricted_token.cc',
98             'src/restricted_token.h',
99             'src/sandbox_factory.h',
100             'src/sandbox_globals.cc',
101             'src/sandbox_nt_types.h',
102             'src/sandbox_nt_util.cc',
103             'src/sandbox_nt_util.h',
104             'src/sandbox_policy_base.cc',
105             'src/sandbox_policy_base.h',
106             'src/sandbox_policy.h',
107             'src/sandbox_types.h',
108             'src/sandbox_utils.cc',
109             'src/sandbox_utils.h',
110             'src/sandbox.cc',
111             'src/sandbox.h',
112             'src/security_level.h',
113             'src/service_resolver.cc',
114             'src/service_resolver.h',
115             'src/shared_handles.cc',
116             'src/shared_handles.h',
117             'src/sharedmem_ipc_client.cc',
118             'src/sharedmem_ipc_client.h',
119             'src/sharedmem_ipc_server.cc',
120             'src/sharedmem_ipc_server.h',
121             'src/sid.cc',
122             'src/sid.h',
123             'src/sync_dispatcher.cc',
124             'src/sync_dispatcher.h',
125             'src/sync_interception.cc',
126             'src/sync_interception.h',
127             'src/sync_policy.cc',
128             'src/sync_policy.h',
129             'src/target_interceptions.cc',
130             'src/target_interceptions.h',
131             'src/target_process.cc',
132             'src/target_process.h',
133             'src/target_services.cc',
134             'src/target_services.h',
135             'src/win_utils.cc',
136             'src/win_utils.h',
137             'src/win2k_threadpool.cc',
138             'src/win2k_threadpool.h',
139             'src/window.cc',
140             'src/window.h',
141         ],
142         'target_conditions': [
143           ['target_arch=="x64"', {
144             'sources': [
145               'src/interceptors_64.cc',
146               'src/interceptors_64.h',
147               'src/resolver_64.cc',
148               'src/service_resolver_64.cc',
149               'src/Wow64_64.cc',
150             ],
151           }],
152           ['target_arch=="ia32"', {
153             'sources': [
154               'src/resolver_32.cc',
155               'src/service_resolver_32.cc',
156               'src/sidestep_resolver.cc',
157               'src/sidestep_resolver.h',
158               'src/sidestep\ia32_modrm_map.cpp',
159               'src/sidestep\ia32_opcode_map.cpp',
160               'src/sidestep\mini_disassembler_types.h',
161               'src/sidestep\mini_disassembler.cpp',
162               'src/sidestep\mini_disassembler.h',
163               'src/sidestep\preamble_patcher_with_stub.cpp',
164               'src/sidestep\preamble_patcher.h',
165               'src/Wow64.cc',
166               'src/Wow64.h',
167             ],
168           }],
169         ],
170       }],
171     ],
172   },
173   'targets': [
174     {
175       'target_name': 'sandbox',
176       'type': 'static_library',
177       'variables': {
178         'sandbox_windows_target': 1,
179       },
180       'dependencies': [
181         '../base/base.gyp:base',
182         '../base/base.gyp:base_static',
183       ],
184       'export_dependent_settings': [
185         '../base/base.gyp:base',
186       ],
187       'include_dirs': [
188         '../..',
189       ],
190       'direct_dependent_settings': {
191         'include_dirs': [
192           'src',
193           '../..',
194         ],
195       },
196       'target_conditions': [
197         ['target_arch=="ia32"', {
198           'copies': [
199             {
200               'destination': '<(PRODUCT_DIR)',
201               'files': [
202                 'wow_helper/wow_helper.exe',
203                 'wow_helper/wow_helper.pdb',
204               ],
205             },
206           ],
207         }],
208       ],
209     },
210     {
211       'target_name': 'sbox_integration_tests',
212       'type': 'executable',
213       'dependencies': [
214         'sandbox',
215         '../base/base.gyp:test_support_base',
216         '../testing/gtest.gyp:gtest',
217       ],
218       'sources': [
219         'src/address_sanitizer_test.cc',
220         'src/app_container_test.cc',
221         'src/file_policy_test.cc',
222         'src/handle_inheritance_test.cc',
223         'src/handle_policy_test.cc',
224         'tests/integration_tests/integration_tests_test.cc',
225         'src/handle_closer_test.cc',
226         'src/integrity_level_test.cc',
227         'src/ipc_ping_test.cc',
228         'src/named_pipe_policy_test.cc',
229         'src/policy_target_test.cc',
230         'src/process_mitigations_test.cc',
231         'src/process_policy_test.cc',
232         'src/registry_policy_test.cc',
233         'src/sync_policy_test.cc',
234         'src/sync_policy_test.h',
235         'src/unload_dll_test.cc',
236         'tests/common/controller.cc',
237         'tests/common/controller.h',
238         'tests/common/test_utils.cc',
239         'tests/common/test_utils.h',
240         'tests/integration_tests/integration_tests.cc',
241       ],
242     },
243     {
244       'target_name': 'sbox_validation_tests',
245       'type': 'executable',
246       'dependencies': [
247         'sandbox',
248         '../base/base.gyp:test_support_base',
249         '../testing/gtest.gyp:gtest',
250       ],
251       'sources': [
252         'tests/common/controller.cc',
253         'tests/common/controller.h',
254         'tests/validation_tests/unit_tests.cc',
255         'tests/validation_tests/commands.cc',
256         'tests/validation_tests/commands.h',
257         'tests/validation_tests/suite.cc',
258       ],
259     },
260     {
261       'target_name': 'sbox_unittests',
262       'type': 'executable',
263       'dependencies': [
264         'sandbox',
265         '../base/base.gyp:test_support_base',
266         '../testing/gtest.gyp:gtest',
267       ],
268       'sources': [
269         'src/app_container_unittest.cc',
270         'src/interception_unittest.cc',
271         'src/service_resolver_unittest.cc',
272         'src/restricted_token_unittest.cc',
273         'src/job_unittest.cc',
274         'src/sid_unittest.cc',
275         'src/policy_engine_unittest.cc',
276         'src/policy_low_level_unittest.cc',
277         'src/policy_opcodes_unittest.cc',
278         'src/ipc_unittest.cc',
279         'src/threadpool_unittest.cc',
280         'src/win_utils_unittest.cc',
281         'tests/common/test_utils.cc',
282         'tests/common/test_utils.h',
283         'tests/unit_tests/unit_tests.cc',
284       ],
285     },
286     {
287       'target_name': 'sandbox_poc',
288       'type': 'executable',
289       'dependencies': [
290         'sandbox',
291         'pocdll',
292       ],
293       'sources': [
294         'sandbox_poc/main_ui_window.cc',
295         'sandbox_poc/main_ui_window.h',
296         'sandbox_poc/resource.h',
297         'sandbox_poc/sandbox.cc',
298         'sandbox_poc/sandbox.h',
299         'sandbox_poc/sandbox.ico',
300         'sandbox_poc/sandbox.rc',
301       ],
302       'link_settings': {
303         'libraries': [
304           '-lcomctl32.lib',
305         ],
306       },
307       'msvs_settings': {
308         'VCLinkerTool': {
309           'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
310         },
311       },
312     },
313     {
314       'target_name': 'pocdll',
315       'type': 'shared_library',
316       'sources': [
317         'sandbox_poc/pocdll/exports.h',
318         'sandbox_poc/pocdll/fs.cc',
319         'sandbox_poc/pocdll/handles.cc',
320         'sandbox_poc/pocdll/invasive.cc',
321         'sandbox_poc/pocdll/network.cc',
322         'sandbox_poc/pocdll/pocdll.cc',
323         'sandbox_poc/pocdll/processes_and_threads.cc',
324         'sandbox_poc/pocdll/registry.cc',
325         'sandbox_poc/pocdll/spyware.cc',
326         'sandbox_poc/pocdll/utils.h',
327       ],
328       'defines': [
329         'POCDLL_EXPORTS',
330       ],
331       'include_dirs': [
332         '../..',
333       ],
334     },
335   ],
336   'conditions': [
337     ['OS=="win" and target_arch=="ia32"', {
338       'targets': [
339         {
340           'target_name': 'sandbox_win64',
341           'type': 'static_library',
342           'variables': {
343             'sandbox_windows_target': 1,
344             'target_arch': 'x64',
345           },
346           'dependencies': [
347             '../base/base.gyp:base_win64',
348             '../base/base.gyp:base_static_win64',
349           ],
350           'configurations': {
351             'Common_Base': {
352               'msvs_target_platform': 'x64',
353             },
354           },
355           'include_dirs': [
356             '../..',
357           ],
358           'direct_dependent_settings': {
359             'include_dirs': [
360               'src',
361               '../..',
362             ],
363           },
364           'defines': [
365             '<@(nacl_win64_defines)',
366           ]
367         },
368       ],
369     }],
370     ['test_isolation_mode != "noop"', {
371       'targets': [
372         {
373           'target_name': 'sbox_integration_tests_run',
374           'type': 'none',
375           'dependencies': [
376             'sbox_integration_tests',
377           ],
378           'includes': [
379             '../../build/isolate.gypi',
380           ],
381           'sources': [
382             '../sbox_integration_tests.isolate',
383           ],
384         },
385         {
386           'target_name': 'sbox_unittests_run',
387           'type': 'none',
388           'dependencies': [
389             'sbox_unittests',
390           ],
391           'includes': [
392             '../../build/isolate.gypi',
393           ],
394           'sources': [
395             '../sbox_unittests.isolate',
396           ],
397         },
398         {
399           'target_name': 'sbox_validation_tests_run',
400           'type': 'none',
401           'dependencies': [
402             'sbox_validation_tests',
403           ],
404           'includes': [
405             '../../build/isolate.gypi',
406           ],
407           'sources': [
408             '../sbox_validation_tests.isolate',
409           ],
410         },
411       ],
412     }],
413   ],