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.
10 'nacl/nacl_defines.gypi',
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.
21 '<(INTERMEDIATE_DIR)',
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',
45 # TODO(gregoryd): consider switching NaCl to use Chrome OS defines
49 '__STDC_LIMIT_MACROS=1',
52 '<(DEPTH)/third_party/wtl/include',
57 '__STDC_LIMIT_MACROS=1',
60 '../components/nacl/common/nacl_paths.cc',
61 '../components/nacl/common/nacl_paths.h',
72 'target_name': 'nacl',
73 'type': 'static_library',
78 '../base/base.gyp:base',
79 '../base/base.gyp:base_static',
81 '../mojo/mojo_edk.gyp:mojo_system_impl',
82 '../mojo/mojo_nacl.gyp:monacl_syscall',
83 '../ppapi/ppapi_internal.gyp:ppapi_shared',
84 '../ppapi/ppapi_internal.gyp:ppapi_ipc',
85 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome',
88 ['disable_nacl_untrusted==0', {
90 '../ppapi/native_client/native_client.gyp:nacl_irt',
91 '../ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp:pnacl_support_extension',
95 'direct_dependent_settings': {
102 'target_name': 'nacl_browser',
103 'type': 'static_library',
105 'nacl/browser/nacl_broker_host_win.cc',
106 'nacl/browser/nacl_broker_host_win.h',
107 'nacl/browser/nacl_broker_service_win.cc',
108 'nacl/browser/nacl_broker_service_win.h',
109 'nacl/browser/nacl_browser.cc',
110 'nacl/browser/nacl_browser.h',
111 'nacl/browser/nacl_file_host.cc',
112 'nacl/browser/nacl_file_host.h',
113 'nacl/browser/nacl_host_message_filter.cc',
114 'nacl/browser/nacl_host_message_filter.h',
115 'nacl/browser/nacl_process_host.cc',
116 'nacl/browser/nacl_process_host.h',
117 'nacl/browser/nacl_validation_cache.cc',
118 'nacl/browser/nacl_validation_cache.h',
119 'nacl/browser/pnacl_host.cc',
120 'nacl/browser/pnacl_host.h',
121 'nacl/browser/pnacl_translation_cache.cc',
122 'nacl/browser/pnacl_translation_cache.h',
123 'nacl/common/nacl_debug_exception_handler_win.cc',
124 'nacl/common/nacl_debug_exception_handler_win.h',
132 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel',
133 '../content/content.gyp:content_browser',
138 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
139 'msvs_disabled_warnings': [4267, ],
143 '../components/nacl/zygote/nacl_fork_delegate_linux.cc',
144 '../components/nacl/zygote/nacl_fork_delegate_linux.h',
147 # Required by nacl_fork_delegate_linux.cc.
148 '../sandbox/sandbox.gyp:suid_sandbox_client',
154 'target_name': 'nacl_renderer',
155 'type': 'static_library',
157 'nacl/renderer/file_downloader.cc',
158 'nacl/renderer/file_downloader.h',
159 'nacl/renderer/histogram.cc',
160 'nacl/renderer/histogram.h',
161 'nacl/renderer/manifest_downloader.cc',
162 'nacl/renderer/manifest_downloader.h',
163 'nacl/renderer/manifest_service_channel.cc',
164 'nacl/renderer/manifest_service_channel.h',
165 'nacl/renderer/nacl_helper.cc',
166 'nacl/renderer/nacl_helper.h',
167 'nacl/renderer/json_manifest.cc',
168 'nacl/renderer/json_manifest.h',
169 'nacl/renderer/nexe_load_manager.cc',
170 'nacl/renderer/nexe_load_manager.h',
171 'nacl/renderer/platform_info.cc',
172 'nacl/renderer/platform_info.h',
173 'nacl/renderer/pnacl_translation_resource_host.cc',
174 'nacl/renderer/pnacl_translation_resource_host.h',
175 'nacl/renderer/ppb_nacl_private_impl.cc',
176 'nacl/renderer/ppb_nacl_private_impl.h',
177 'nacl/renderer/progress_event.cc',
178 'nacl/renderer/progress_event.h',
179 'nacl/renderer/trusted_plugin_channel.cc',
180 'nacl/renderer/trusted_plugin_channel.h',
187 '../content/content.gyp:content_renderer',
188 '../ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
189 '../third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
190 '../third_party/WebKit/public/blink.gyp:blink',
195 'direct_dependent_settings': {
202 'target_name': 'nacl_loader_unittests',
203 'type': '<(gtest_target_type)',
205 'nacl/loader/run_all_unittests.cc',
209 '../base/base.gyp:test_support_base',
210 '../testing/gtest.gyp:gtest',
215 # TODO(mazda): Move this to browser_tests once we have
216 # established a way to run browser_tests on ARM Chrome OS
217 # devices (http://crbug.com/364729).
218 'nacl/loader/nonsfi/irt_icache_unittest.cc',
219 # TODO(hamaji): Currently, we build them twice. Stop building
220 # them for components_unittests. See crbug.com/364751
221 'nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc',
222 'nacl/loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc',
226 '../sandbox/sandbox.gyp:sandbox_linux_test_utils',
236 'target_name': 'nacl_helper',
237 'type': 'executable',
242 'nacl/loader/nacl_helper_linux.cc',
243 'nacl/loader/nacl_helper_linux.h',
250 # Do not pick the default ASan options from
251 # build/sanitizers/sanitizer_options.cc to avoid a conflict with
252 # those in nacl/nacl_helper_linux.cc.
253 '-Wl,-u_sanitizer_options_link_helper',
259 'target_name': 'nacl_linux',
260 'type': 'static_library',
266 # Allow .cc files to know if they're being compiled as part
271 'nacl/loader/nonsfi/abi_conversion.cc',
272 'nacl/loader/nonsfi/abi_conversion.h',
273 'nacl/loader/nonsfi/elf_loader.cc',
274 'nacl/loader/nonsfi/elf_loader.h',
275 'nacl/loader/nonsfi/irt_basic.cc',
276 'nacl/loader/nonsfi/irt_clock.cc',
277 'nacl/loader/nonsfi/irt_exception_handling.cc',
278 'nacl/loader/nonsfi/irt_fdio.cc',
279 'nacl/loader/nonsfi/irt_futex.cc',
280 'nacl/loader/nonsfi/irt_icache.cc',
281 'nacl/loader/nonsfi/irt_interfaces.cc',
282 'nacl/loader/nonsfi/irt_interfaces.h',
283 'nacl/loader/nonsfi/irt_memory.cc',
284 'nacl/loader/nonsfi/irt_ppapi.cc',
285 'nacl/loader/nonsfi/irt_random.cc',
286 'nacl/loader/nonsfi/irt_resource_open.cc',
287 'nacl/loader/nonsfi/irt_thread.cc',
288 'nacl/loader/nonsfi/irt_util.h',
289 'nacl/loader/nonsfi/nonsfi_listener.cc',
290 'nacl/loader/nonsfi/nonsfi_listener.h',
291 'nacl/loader/nonsfi/nonsfi_main.cc',
292 'nacl/loader/nonsfi/nonsfi_main.h',
293 'nacl/loader/nonsfi/nonsfi_sandbox.cc',
294 'nacl/loader/nonsfi/nonsfi_sandbox.h',
295 'nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc',
296 'nacl/loader/sandbox_linux/nacl_sandbox_linux.cc',
297 '../ppapi/nacl_irt/irt_manifest.h',
298 '../ppapi/nacl_irt/manifest_service.cc',
299 '../ppapi/nacl_irt/manifest_service.h',
300 '../ppapi/nacl_irt/plugin_main.cc',
301 '../ppapi/nacl_irt/plugin_main.h',
302 '../ppapi/nacl_irt/plugin_startup.cc',
303 '../ppapi/nacl_irt/plugin_startup.h',
304 '../ppapi/nacl_irt/ppapi_dispatcher.cc',
305 '../ppapi/nacl_irt/ppapi_dispatcher.h',
311 '../components/tracing.gyp:tracing',
312 '../crypto/crypto.gyp:crypto',
313 '../sandbox/sandbox.gyp:libc_urandom_override',
314 '../sandbox/sandbox.gyp:sandbox',
315 '../ppapi/ppapi_internal.gyp:ppapi_proxy',
320 '../build/linux/system.gyp:glib',
323 ['os_posix == 1 and OS != "mac"', {
325 ['use_allocator!="none"', {
327 '../base/allocator/allocator.gyp:allocator',
332 ['use_seccomp_bpf == 0', {
334 '../content/common/sandbox_linux/sandbox_bpf_base_policy_linux.cc',
335 '../content/common/sandbox_linux/sandbox_init_linux.cc',
338 'defines': ['USE_SECCOMP_BPF'],
345 ['OS=="win" and target_arch=="ia32"', {
348 'target_name': 'nacl_win64',
349 'type': 'static_library',
355 '../mojo/mojo_edk.gyp:mojo_system_impl_win64',
356 '../mojo/mojo_nacl.gyp:monacl_syscall_win64',
357 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome64',
358 '../ppapi/ppapi_internal.gyp:ppapi_shared_win64',
359 '../ppapi/ppapi_internal.gyp:ppapi_ipc_win64',
361 'export_dependent_settings': [
362 '../ppapi/ppapi_internal.gyp:ppapi_ipc_win64',
365 '../components/nacl/broker/nacl_broker_listener.cc',
366 '../components/nacl/broker/nacl_broker_listener.h',
367 '../components/nacl/common/nacl_debug_exception_handler_win.cc',
368 '../components/nacl/loader/nacl_helper_win_64.cc',
369 '../components/nacl/loader/nacl_helper_win_64.h',
375 '<@(nacl_win64_defines)',
376 'COMPILE_CONTENT_STATICALLY',
380 'msvs_target_platform': 'x64',
383 'direct_dependent_settings': {
390 'target_name': 'nacl_switches_win64',
391 'type': 'static_library',
393 'nacl/common/nacl_switches.cc',
394 'nacl/common/nacl_switches.h',
401 'msvs_target_platform': 'x64',
406 'target_name': 'nacl_common_win64',
407 'type': 'static_library',
409 'COMPILE_CONTENT_STATICALLY',
412 'nacl/common/nacl_cmd_line.cc',
413 'nacl/common/nacl_cmd_line.h',
414 'nacl/common/nacl_constants.cc',
415 'nacl/common/nacl_constants.h',
416 'nacl/common/nacl_messages.cc',
417 'nacl/common/nacl_messages.h',
418 'nacl/common/nacl_renderer_messages.h',
419 'nacl/common/nacl_renderer_messages.cc',
420 'nacl/common/nacl_types.cc',
421 'nacl/common/nacl_types.h',
422 'nacl/common/nacl_types_param_traits.cc',
423 'nacl/common/nacl_types_param_traits.h',
430 'msvs_target_platform': 'x64',
437 }, { # else (disable_nacl==1)
440 'target_name': 'nacl',
449 'target_name': 'nacl_win64',
454 'target_name': 'nacl_switches_win64',
462 ['disable_nacl!=1 and test_isolation_mode!="noop"', {
465 'target_name': 'nacl_loader_unittests_run',
468 'nacl_loader_unittests',
471 '../build/isolate.gypi',
474 'nacl_loader_unittests.isolate',
482 'target_name': 'nacl_switches',
483 'type': 'static_library',
485 'nacl/common/nacl_switches.cc',
486 'nacl/common/nacl_switches.h',
493 'target_name': 'nacl_common',
494 'type': 'static_library',
496 'nacl/common/nacl_cmd_line.cc',
497 'nacl/common/nacl_cmd_line.h',
498 'nacl/common/nacl_constants.cc',
499 'nacl/common/nacl_constants.h',
500 'nacl/common/nacl_host_messages.h',
501 'nacl/common/nacl_host_messages.cc',
502 'nacl/common/nacl_messages.cc',
503 'nacl/common/nacl_messages.h',
504 'nacl/common/nacl_nonsfi_util.cc',
505 'nacl/common/nacl_nonsfi_util.h',
506 'nacl/common/nacl_process_type.h',
507 'nacl/common/nacl_renderer_messages.h',
508 'nacl/common/nacl_renderer_messages.cc',
509 'nacl/common/nacl_sandbox_type_mac.h',
510 'nacl/common/nacl_types.cc',
511 'nacl/common/nacl_types.h',
512 'nacl/common/nacl_types_param_traits.cc',
513 'nacl/common/nacl_types_param_traits.h',
514 'nacl/common/pnacl_types.cc',
515 'nacl/common/pnacl_types.h',
521 '../content/content.gyp:content_common',