Show clearer error when insecure URL is blocked during SAML enrollment
[chromium-blink-merge.git] / components / nacl.gyp
blob859692403dc67680e65f97cd74770a2727b5802b
1 # Copyright 2013 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   'variables': {
7     'chromium_code': 1,
8   },
9   'includes': [
10     'nacl/nacl_defines.gypi',
11   ],
12   'target_defaults': {
13     'variables': {
14       'nacl_target': 0,
15     },
16     'target_conditions': [
17       # This part is shared between the targets defined below. Only files and
18       # settings relevant for building the Win64 target should be added here.
19       ['nacl_target==1', {
20         'include_dirs': [
21           '<(INTERMEDIATE_DIR)',
22         ],
23         'defines': [
24           '<@(nacl_defines)',
25         ],
26         'sources': [
27           # .cc, .h, and .mm files under nacl that are used on all
28           # platforms, including both 32-bit and 64-bit Windows.
29           # Test files are also not included.
30           'nacl/loader/nacl_ipc_adapter.cc',
31           'nacl/loader/nacl_ipc_adapter.h',
32           'nacl/loader/nacl_main.cc',
33           'nacl/loader/nacl_main_platform_delegate.h',
34           'nacl/loader/nacl_main_platform_delegate_linux.cc',
35           'nacl/loader/nacl_main_platform_delegate_mac.mm',
36           'nacl/loader/nacl_main_platform_delegate_win.cc',
37           'nacl/loader/nacl_listener.cc',
38           'nacl/loader/nacl_listener.h',
39           'nacl/loader/nacl_trusted_listener.cc',
40           'nacl/loader/nacl_trusted_listener.h',
41           'nacl/loader/nacl_validation_db.h',
42           'nacl/loader/nacl_validation_query.cc',
43           'nacl/loader/nacl_validation_query.h',
44         ],
45         # TODO(gregoryd): consider switching NaCl to use Chrome OS defines
46         'conditions': [
47           ['OS=="win"', {
48             'defines': [
49               '__STDC_LIMIT_MACROS=1',
50             ],
51             'include_dirs': [
52               '<(DEPTH)/third_party/wtl/include',
53             ],
54           },],
55           ['OS=="linux"', {
56             'defines': [
57               '__STDC_LIMIT_MACROS=1',
58             ],
59             'sources': [
60               '../components/nacl/common/nacl_paths.cc',
61               '../components/nacl/common/nacl_paths.h',
62             ],
63           },],
64         ],
65       }],
66     ],
67   },
68   'conditions': [
69     ['disable_nacl!=1', {
70       'targets': [
71         {
72           'target_name': 'nacl',
73           'type': 'static_library',
74           'variables': {
75             'nacl_target': 1,
76           },
77           'dependencies': [
78             '../base/base.gyp:base',
79             '../base/base.gyp:base_static',
80             '../ipc/ipc.gyp:ipc',
81             '../ppapi/native_client/src/trusted/plugin/plugin.gyp:ppGoogleNaClPluginChrome',
82             '../ppapi/ppapi_internal.gyp:ppapi_shared',
83             '../ppapi/ppapi_internal.gyp:ppapi_ipc',
84             '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome',
85           ],
86           'conditions': [
87             ['disable_nacl_untrusted==0', {
88               'dependencies': [
89                 '../ppapi/native_client/native_client.gyp:nacl_irt',
90                 '../ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp:pnacl_support_extension',
91               ],
92             }],
93           ],
94           'direct_dependent_settings': {
95             'defines': [
96               '<@(nacl_defines)',
97             ],
98           },
99         },
100         {
101           'target_name': 'nacl_browser',
102           'type': 'static_library',
103           'sources': [
104             'nacl/browser/nacl_broker_host_win.cc',
105             'nacl/browser/nacl_broker_host_win.h',
106             'nacl/browser/nacl_broker_service_win.cc',
107             'nacl/browser/nacl_broker_service_win.h',
108             'nacl/browser/nacl_browser.cc',
109             'nacl/browser/nacl_browser.h',
110             'nacl/browser/nacl_file_host.cc',
111             'nacl/browser/nacl_file_host.h',
112             'nacl/browser/nacl_host_message_filter.cc',
113             'nacl/browser/nacl_host_message_filter.h',
114             'nacl/browser/nacl_process_host.cc',
115             'nacl/browser/nacl_process_host.h',
116             'nacl/browser/nacl_validation_cache.cc',
117             'nacl/browser/nacl_validation_cache.h',
118             'nacl/browser/pnacl_host.cc',
119             'nacl/browser/pnacl_host.h',
120             'nacl/browser/pnacl_translation_cache.cc',
121             'nacl/browser/pnacl_translation_cache.h',
122             'nacl/common/nacl_debug_exception_handler_win.cc',
123             'nacl/common/nacl_debug_exception_handler_win.h',
124           ],
125           'include_dirs': [
126             '..',
127           ],
128           'dependencies': [
129             'nacl_common',
130             'nacl_switches',
131             '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel',
132             '../content/content.gyp:content_browser',
133           ],
134           'defines': [
135             '<@(nacl_defines)',
136           ],
137           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
138           'msvs_disabled_warnings': [4267, ],
139           'conditions': [
140             ['OS=="linux"', {
141               'sources': [
142                 '../components/nacl/zygote/nacl_fork_delegate_linux.cc',
143                 '../components/nacl/zygote/nacl_fork_delegate_linux.h',
144               ],
145               'dependencies': [
146                 # Required by nacl_fork_delegate_linux.cc.
147                 '../sandbox/sandbox.gyp:suid_sandbox_client',
148               ]
149             }],
150           ],
151         },
152         {
153           'target_name': 'nacl_renderer',
154           'type': 'static_library',
155           'sources': [
156             'nacl/renderer/histogram.cc',
157             'nacl/renderer/histogram.h',
158             'nacl/renderer/manifest_downloader.cc',
159             'nacl/renderer/manifest_downloader.h',
160             'nacl/renderer/manifest_service_channel.cc',
161             'nacl/renderer/manifest_service_channel.h',
162             'nacl/renderer/json_manifest.cc',
163             'nacl/renderer/json_manifest.h',
164             'nacl/renderer/nexe_load_manager.cc',
165             'nacl/renderer/nexe_load_manager.h',
166             'nacl/renderer/pnacl_translation_resource_host.cc',
167             'nacl/renderer/pnacl_translation_resource_host.h',
168             'nacl/renderer/ppb_nacl_private_impl.cc',
169             'nacl/renderer/ppb_nacl_private_impl.h',
170             'nacl/renderer/sandbox_arch.cc',
171             'nacl/renderer/sandbox_arch.h',
172             'nacl/renderer/trusted_plugin_channel.cc',
173             'nacl/renderer/trusted_plugin_channel.h',
174           ],
175           'include_dirs': [
176             '..',
177           ],
178           'dependencies': [
179             '../content/content.gyp:content_renderer',
180             '../third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
181             '../third_party/WebKit/public/blink.gyp:blink',
182             '../webkit/common/webkit_common.gyp:webkit_common',
183           ],
184           'defines': [
185             '<@(nacl_defines)',
186           ],
187           'direct_dependent_settings': {
188             'defines': [
189               '<@(nacl_defines)',
190             ],
191           },
192         },
193         {
194           'target_name': 'nacl_loader_unittests',
195           'type': '<(gtest_target_type)',
196           'sources': [
197             'nacl/loader/run_all_unittests.cc',
198           ],
199           'dependencies': [
200             'nacl',
201             '../base/base.gyp:test_support_base',
202             '../testing/gtest.gyp:gtest',
203           ],
204           'conditions': [
205             ['OS=="linux"', {
206               'sources': [
207                 # TODO(mazda): Move this to browser_tests once we have
208                 # established a way to run browser_tests on ARM Chrome OS
209                 # devices (http://crbug.com/364729).
210                 'nacl/loader/nonsfi/irt_icache_unittest.cc',
211                 # TODO(hamaji): Currently, we build them twice. Stop building
212                 # them for components_unittests. See crbug.com/364751
213                 'nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc',
214                 'nacl/loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc',
215               ],
216               'dependencies': [
217                 'nacl_linux',
218                 '../sandbox/sandbox.gyp:sandbox_linux_test_utils',
219               ],
220             }],
221           ],
222         },
223       ],
224       'conditions': [
225         ['OS=="linux"', {
226           'targets': [
227             {
228               'target_name': 'nacl_helper',
229               'type': 'executable',
230               'include_dirs': [
231                 '..',
232               ],
233               'sources': [
234                 'nacl/loader/nacl_helper_linux.cc',
235                 'nacl/loader/nacl_helper_linux.h',
236               ],
237               'dependencies': [
238                 'nacl_linux',
239               ],
240               'cflags': ['-fPIE'],
241               'ldflags!': [
242                 # Do not pick the default ASan options from
243                 # base/debug/sanitizer_options.cc to avoid a conflict with those
244                 # in nacl/nacl_helper_linux.cc.
245                 '-Wl,-u_sanitizer_options_link_helper',
246               ],
247               'link_settings': {
248                 'ldflags': ['-pie'],
249               },
250             }, {
251               'target_name': 'nacl_linux',
252               'type': 'static_library',
253               'include_dirs': [
254                 '..',
255               ],
256               'defines': [
257                 '<@(nacl_defines)',
258                 # Allow .cc files to know if they're being compiled as part
259                 # of nacl_helper.
260                 'IN_NACL_HELPER=1',
261               ],
262               'sources': [
263                 'nacl/loader/nonsfi/abi_conversion.cc',
264                 'nacl/loader/nonsfi/abi_conversion.h',
265                 'nacl/loader/nonsfi/elf_loader.cc',
266                 'nacl/loader/nonsfi/elf_loader.h',
267                 'nacl/loader/nonsfi/irt_basic.cc',
268                 'nacl/loader/nonsfi/irt_clock.cc',
269                 'nacl/loader/nonsfi/irt_exception_handling.cc',
270                 'nacl/loader/nonsfi/irt_fdio.cc',
271                 'nacl/loader/nonsfi/irt_futex.cc',
272                 'nacl/loader/nonsfi/irt_icache.cc',
273                 'nacl/loader/nonsfi/irt_interfaces.cc',
274                 'nacl/loader/nonsfi/irt_interfaces.h',
275                 'nacl/loader/nonsfi/irt_memory.cc',
276                 'nacl/loader/nonsfi/irt_ppapi.cc',
277                 'nacl/loader/nonsfi/irt_random.cc',
278                 'nacl/loader/nonsfi/irt_resource_open.cc',
279                 'nacl/loader/nonsfi/irt_thread.cc',
280                 'nacl/loader/nonsfi/irt_util.h',
281                 'nacl/loader/nonsfi/nonsfi_main.cc',
282                 'nacl/loader/nonsfi/nonsfi_main.h',
283                 'nacl/loader/nonsfi/nonsfi_sandbox.cc',
284                 'nacl/loader/nonsfi/nonsfi_sandbox.h',
285                 'nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc',
286                 'nacl/loader/sandbox_linux/nacl_sandbox_linux.cc',
287                 '../ppapi/nacl_irt/irt_manifest.h',
288                 '../ppapi/nacl_irt/manifest_service.cc',
289                 '../ppapi/nacl_irt/manifest_service.h',
290                 '../ppapi/nacl_irt/plugin_main.cc',
291                 '../ppapi/nacl_irt/plugin_main.h',
292                 '../ppapi/nacl_irt/plugin_startup.cc',
293                 '../ppapi/nacl_irt/plugin_startup.h',
294                 '../ppapi/nacl_irt/ppapi_dispatcher.cc',
295                 '../ppapi/nacl_irt/ppapi_dispatcher.h',
296               ],
297               'dependencies': [
298                 'nacl',
299                 'nacl_common',
300                 'nacl_switches',
301                 '../components/tracing.gyp:tracing',
302                 '../crypto/crypto.gyp:crypto',
303                 '../sandbox/sandbox.gyp:libc_urandom_override',
304                 '../sandbox/sandbox.gyp:sandbox',
305                 '../ppapi/ppapi_internal.gyp:ppapi_proxy',
306               ],
307               'conditions': [
308                 ['use_glib == 1', {
309                   'dependencies': [
310                     '../build/linux/system.gyp:glib',
311                   ],
312                 }],
313                 ['os_posix == 1 and OS != "mac"', {
314                   'conditions': [
315                     ['use_allocator!="none"', {
316                       'dependencies': [
317                         '../base/allocator/allocator.gyp:allocator',
318                       ],
319                     }],
320                   ],
321                 }],
322                 ['use_seccomp_bpf == 0', {
323                   'sources!': [
324                     '../content/common/sandbox_linux/sandbox_bpf_base_policy_linux.cc',
325                     '../content/common/sandbox_linux/sandbox_init_linux.cc',
326                   ],
327                 }, {
328                   'defines': ['USE_SECCOMP_BPF'],
329                 }],
330               ],
331               'cflags': ['-fPIE'],
332             },
333           ],
334         }],
335         ['OS=="win" and target_arch=="ia32"', {
336           'targets': [
337             {
338               'target_name': 'nacl_win64',
339               'type': 'static_library',
340               'variables': {
341                 'nacl_target': 1,
342               },
343               'dependencies': [
344                 'nacl_common_win64',
345                 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome64',
346                 '../ppapi/ppapi_internal.gyp:ppapi_shared_win64',
347                 '../ppapi/ppapi_internal.gyp:ppapi_ipc_win64',
348               ],
349               'export_dependent_settings': [
350                 '../ppapi/ppapi_internal.gyp:ppapi_ipc_win64',
351               ],
352               'sources': [
353                 '../components/nacl/broker/nacl_broker_listener.cc',
354                 '../components/nacl/broker/nacl_broker_listener.h',
355                 '../components/nacl/common/nacl_debug_exception_handler_win.cc',
356                 '../components/nacl/loader/nacl_helper_win_64.cc',
357                 '../components/nacl/loader/nacl_helper_win_64.h',
358               ],
359               'include_dirs': [
360                 '..',
361               ],
362               'defines': [
363                 '<@(nacl_win64_defines)',
364                 'COMPILE_CONTENT_STATICALLY',
365               ],
366               'configurations': {
367                 'Common_Base': {
368                   'msvs_target_platform': 'x64',
369                 },
370               },
371               'direct_dependent_settings': {
372                 'defines': [
373                   '<@(nacl_defines)',
374                 ],
375               },
376             },
377             {
378               'target_name': 'nacl_switches_win64',
379               'type': 'static_library',
380               'sources': [
381                 'nacl/common/nacl_switches.cc',
382                 'nacl/common/nacl_switches.h',
383               ],
384               'include_dirs': [
385                 '..',
386               ],
387               'configurations': {
388                 'Common_Base': {
389                   'msvs_target_platform': 'x64',
390                 },
391               },
392             },
393             {
394               'target_name': 'nacl_common_win64',
395               'type': 'static_library',
396               'defines': [
397                 'COMPILE_CONTENT_STATICALLY',
398               ],
399               'sources': [
400                 'nacl/common/nacl_cmd_line.cc',
401                 'nacl/common/nacl_cmd_line.h',
402                 'nacl/common/nacl_messages.cc',
403                 'nacl/common/nacl_messages.h',
404                 'nacl/common/nacl_types.cc',
405                 'nacl/common/nacl_types.h',
406               ],
407               'include_dirs': [
408                 '..',
409               ],
410               'configurations': {
411                 'Common_Base': {
412                   'msvs_target_platform': 'x64',
413                 },
414               },
415             },
416           ],
417         }],
418       ],
419     }, {  # else (disable_nacl==1)
420       'targets': [
421         {
422           'target_name': 'nacl',
423           'type': 'none',
424           'sources': [],
425         },
426       ],
427       'conditions': [
428         ['OS=="win"', {
429           'targets': [
430             {
431               'target_name': 'nacl_win64',
432               'type': 'none',
433               'sources': [],
434             },
435             {
436               'target_name': 'nacl_switches_win64',
437               'type': 'none',
438               'sources': [],
439             },
440           ],
441         }],
442       ],
443     }],
444   ],
445   'targets': [
446     {
447       'target_name': 'nacl_switches',
448       'type': 'static_library',
449       'sources': [
450         'nacl/common/nacl_switches.cc',
451         'nacl/common/nacl_switches.h',
452     ],
453       'include_dirs': [
454         '..',
455       ],
456     },
457     {
458       'target_name': 'nacl_common',
459       'type': 'static_library',
460       'sources': [
461         'nacl/common/nacl_cmd_line.cc',
462         'nacl/common/nacl_cmd_line.h',
463         'nacl/common/nacl_host_messages.h',
464         'nacl/common/nacl_host_messages.cc',
465         'nacl/common/nacl_messages.cc',
466         'nacl/common/nacl_messages.h',
467         'nacl/common/nacl_process_type.h',
468         'nacl/common/nacl_sandbox_type_mac.h',
469         'nacl/common/nacl_types.cc',
470         'nacl/common/nacl_types.h',
471         'nacl/common/pnacl_types.cc',
472         'nacl/common/pnacl_types.h',
473       ],
474       'include_dirs': [
475         '..',
476       ],
477       'dependencies': [
478         '../content/content.gyp:content_common',
479       ],
480     },
481   ]