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',
80 '../crypto/crypto.gyp:crypto',
82 '../mojo/mojo_nacl.gyp:monacl_syscall',
83 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome',
84 '../ppapi/ppapi_internal.gyp:ppapi_ipc',
85 '../ppapi/ppapi_internal.gyp:ppapi_shared',
86 '../third_party/mojo/mojo_edk.gyp:mojo_system_impl',
89 ['disable_nacl_untrusted==0', {
91 '../ppapi/native_client/native_client.gyp:nacl_irt',
92 '../ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp:pnacl_support_extension',
96 'direct_dependent_settings': {
103 'target_name': 'nacl_browser',
104 'type': 'static_library',
106 'nacl/browser/nacl_broker_host_win.cc',
107 'nacl/browser/nacl_broker_host_win.h',
108 'nacl/browser/nacl_broker_service_win.cc',
109 'nacl/browser/nacl_broker_service_win.h',
110 'nacl/browser/nacl_browser.cc',
111 'nacl/browser/nacl_browser.h',
112 'nacl/browser/nacl_file_host.cc',
113 'nacl/browser/nacl_file_host.h',
114 'nacl/browser/nacl_host_message_filter.cc',
115 'nacl/browser/nacl_host_message_filter.h',
116 'nacl/browser/nacl_process_host.cc',
117 'nacl/browser/nacl_process_host.h',
118 'nacl/browser/nacl_validation_cache.cc',
119 'nacl/browser/nacl_validation_cache.h',
120 'nacl/browser/pnacl_host.cc',
121 'nacl/browser/pnacl_host.h',
122 'nacl/browser/pnacl_translation_cache.cc',
123 'nacl/browser/pnacl_translation_cache.h',
124 'nacl/common/nacl_debug_exception_handler_win.cc',
125 'nacl/common/nacl_debug_exception_handler_win.h',
133 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel',
134 '../content/content.gyp:content_browser',
139 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
140 'msvs_disabled_warnings': [4267, ],
144 '../components/nacl/zygote/nacl_fork_delegate_linux.cc',
145 '../components/nacl/zygote/nacl_fork_delegate_linux.h',
148 # Required by nacl_fork_delegate_linux.cc.
149 '../sandbox/sandbox.gyp:suid_sandbox_client',
150 '../sandbox/sandbox.gyp:sandbox_services',
156 'target_name': 'nacl_renderer',
157 'type': 'static_library',
159 'nacl/renderer/file_downloader.cc',
160 'nacl/renderer/file_downloader.h',
161 'nacl/renderer/histogram.cc',
162 'nacl/renderer/histogram.h',
163 'nacl/renderer/manifest_downloader.cc',
164 'nacl/renderer/manifest_downloader.h',
165 'nacl/renderer/manifest_service_channel.cc',
166 'nacl/renderer/manifest_service_channel.h',
167 'nacl/renderer/nacl_helper.cc',
168 'nacl/renderer/nacl_helper.h',
169 'nacl/renderer/json_manifest.cc',
170 'nacl/renderer/json_manifest.h',
171 'nacl/renderer/nexe_load_manager.cc',
172 'nacl/renderer/nexe_load_manager.h',
173 'nacl/renderer/platform_info.cc',
174 'nacl/renderer/platform_info.h',
175 'nacl/renderer/pnacl_translation_resource_host.cc',
176 'nacl/renderer/pnacl_translation_resource_host.h',
177 'nacl/renderer/ppb_nacl_private_impl.cc',
178 'nacl/renderer/ppb_nacl_private_impl.h',
179 'nacl/renderer/progress_event.cc',
180 'nacl/renderer/progress_event.h',
181 'nacl/renderer/trusted_plugin_channel.cc',
182 'nacl/renderer/trusted_plugin_channel.h',
189 '../content/content.gyp:content_renderer',
190 '../components/nacl/renderer/plugin/plugin.gyp:nacl_trusted_plugin',
191 '../third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
192 '../third_party/WebKit/public/blink.gyp:blink',
197 'direct_dependent_settings': {
204 'target_name': 'nacl_loader_unittests',
205 'type': '<(gtest_target_type)',
207 'nacl/loader/nacl_ipc_adapter_unittest.cc',
208 'nacl/loader/nacl_validation_query_unittest.cc',
209 'nacl/loader/run_all_unittests.cc',
213 '../base/base.gyp:test_support_base',
214 '../ipc/ipc.gyp:test_support_ipc',
215 '../testing/gtest.gyp:gtest',
220 # TODO(mazda): Move this to browser_tests once we have
221 # established a way to run browser_tests on ARM Chrome OS
222 # devices (http://crbug.com/364729).
223 'nacl/loader/nonsfi/irt_icache_unittest.cc',
224 # TODO(hamaji): Currently, we build them twice. Stop building
225 # them for components_unittests. See crbug.com/364751
226 'nacl/loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc',
227 'nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc',
231 '../sandbox/sandbox.gyp:sandbox_linux_test_utils',
241 'target_name': 'nacl_helper',
242 'type': 'executable',
247 'nacl/loader/nacl_helper_linux.cc',
248 'nacl/loader/nacl_helper_linux.h',
255 # Do not pick the default ASan options from
256 # build/sanitizers/sanitizer_options.cc to avoid a conflict with
257 # those in nacl/nacl_helper_linux.cc.
258 '-Wl,-u_sanitizer_options_link_helper',
264 'target_name': 'nacl_linux',
265 'type': 'static_library',
271 # Allow .cc files to know if they're being compiled as part
276 'nacl/loader/nonsfi/abi_conversion.cc',
277 'nacl/loader/nonsfi/abi_conversion.h',
278 'nacl/loader/nonsfi/elf_loader.cc',
279 'nacl/loader/nonsfi/elf_loader.h',
280 'nacl/loader/nonsfi/irt_basic.cc',
281 'nacl/loader/nonsfi/irt_clock.cc',
282 'nacl/loader/nonsfi/irt_exception_handling.cc',
283 'nacl/loader/nonsfi/irt_fdio.cc',
284 'nacl/loader/nonsfi/irt_futex.cc',
285 'nacl/loader/nonsfi/irt_icache.cc',
286 'nacl/loader/nonsfi/irt_interfaces.cc',
287 'nacl/loader/nonsfi/irt_interfaces.h',
288 'nacl/loader/nonsfi/irt_memory.cc',
289 'nacl/loader/nonsfi/irt_ppapi.cc',
290 'nacl/loader/nonsfi/irt_random.cc',
291 'nacl/loader/nonsfi/irt_resource_open.cc',
292 'nacl/loader/nonsfi/irt_thread.cc',
293 'nacl/loader/nonsfi/irt_util.h',
294 'nacl/loader/nonsfi/nonsfi_listener.cc',
295 'nacl/loader/nonsfi/nonsfi_listener.h',
296 'nacl/loader/nonsfi/nonsfi_main.cc',
297 'nacl/loader/nonsfi/nonsfi_main.h',
298 'nacl/loader/nonsfi/nonsfi_sandbox.cc',
299 'nacl/loader/nonsfi/nonsfi_sandbox.h',
300 'nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc',
301 'nacl/loader/sandbox_linux/nacl_sandbox_linux.cc',
302 '../ppapi/nacl_irt/irt_manifest.h',
303 '../ppapi/nacl_irt/manifest_service.cc',
304 '../ppapi/nacl_irt/manifest_service.h',
305 '../ppapi/nacl_irt/plugin_main.cc',
306 '../ppapi/nacl_irt/plugin_main.h',
307 '../ppapi/nacl_irt/plugin_startup.cc',
308 '../ppapi/nacl_irt/plugin_startup.h',
309 '../ppapi/nacl_irt/ppapi_dispatcher.cc',
310 '../ppapi/nacl_irt/ppapi_dispatcher.h',
316 '../components/tracing.gyp:tracing',
317 '../crypto/crypto.gyp:crypto',
318 '../sandbox/sandbox.gyp:libc_urandom_override',
319 '../sandbox/sandbox.gyp:sandbox',
320 '../ppapi/ppapi_internal.gyp:ppapi_proxy',
325 '../build/linux/system.gyp:glib',
328 ['os_posix == 1 and OS != "mac"', {
330 ['use_allocator!="none"', {
332 '../base/allocator/allocator.gyp:allocator',
337 ['use_seccomp_bpf == 0', {
339 '../content/common/sandbox_linux/sandbox_bpf_base_policy_linux.cc',
340 '../content/common/sandbox_linux/sandbox_init_linux.cc',
343 'defines': ['USE_SECCOMP_BPF'],
350 ['OS=="win" and target_arch=="ia32"', {
353 'target_name': 'nacl_win64',
354 'type': 'static_library',
360 '../mojo/mojo_nacl.gyp:monacl_syscall_win64',
361 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome64',
362 '../ppapi/ppapi_internal.gyp:ppapi_shared_win64',
363 '../ppapi/ppapi_internal.gyp:ppapi_ipc_win64',
364 '../third_party/mojo/mojo_edk.gyp:mojo_system_impl_win64',
366 'export_dependent_settings': [
367 '../ppapi/ppapi_internal.gyp:ppapi_ipc_win64',
370 '../components/nacl/broker/nacl_broker_listener.cc',
371 '../components/nacl/broker/nacl_broker_listener.h',
372 '../components/nacl/common/nacl_debug_exception_handler_win.cc',
373 '../components/nacl/loader/nacl_helper_win_64.cc',
374 '../components/nacl/loader/nacl_helper_win_64.h',
380 '<@(nacl_win64_defines)',
381 'COMPILE_CONTENT_STATICALLY',
385 'msvs_target_platform': 'x64',
388 'direct_dependent_settings': {
395 'target_name': 'nacl_switches_win64',
396 'type': 'static_library',
398 'nacl/common/nacl_switches.cc',
399 'nacl/common/nacl_switches.h',
406 'msvs_target_platform': 'x64',
411 'target_name': 'nacl_common_win64',
412 'type': 'static_library',
414 'COMPILE_CONTENT_STATICALLY',
417 'nacl/common/nacl_cmd_line.cc',
418 'nacl/common/nacl_cmd_line.h',
419 'nacl/common/nacl_constants.cc',
420 'nacl/common/nacl_constants.h',
421 'nacl/common/nacl_messages.cc',
422 'nacl/common/nacl_messages.h',
423 'nacl/common/nacl_renderer_messages.h',
424 'nacl/common/nacl_renderer_messages.cc',
425 'nacl/common/nacl_types.cc',
426 'nacl/common/nacl_types.h',
427 'nacl/common/nacl_types_param_traits.cc',
428 'nacl/common/nacl_types_param_traits.h',
435 'msvs_target_platform': 'x64',
442 }, { # else (disable_nacl==1)
445 'target_name': 'nacl',
454 'target_name': 'nacl_win64',
459 'target_name': 'nacl_switches_win64',
467 ['disable_nacl!=1 and test_isolation_mode!="noop"', {
470 'target_name': 'nacl_loader_unittests_run',
473 'nacl_loader_unittests',
476 '../build/isolate.gypi',
479 'nacl_loader_unittests.isolate',
487 'target_name': 'nacl_switches',
488 'type': 'static_library',
490 'nacl/common/nacl_switches.cc',
491 'nacl/common/nacl_switches.h',
498 'target_name': 'nacl_common',
499 'type': 'static_library',
501 'nacl/common/nacl_cmd_line.cc',
502 'nacl/common/nacl_cmd_line.h',
503 'nacl/common/nacl_constants.cc',
504 'nacl/common/nacl_constants.h',
505 'nacl/common/nacl_host_messages.h',
506 'nacl/common/nacl_host_messages.cc',
507 'nacl/common/nacl_messages.cc',
508 'nacl/common/nacl_messages.h',
509 'nacl/common/nacl_nonsfi_util.cc',
510 'nacl/common/nacl_nonsfi_util.h',
511 'nacl/common/nacl_process_type.h',
512 'nacl/common/nacl_renderer_messages.h',
513 'nacl/common/nacl_renderer_messages.cc',
514 'nacl/common/nacl_sandbox_type_mac.h',
515 'nacl/common/nacl_types.cc',
516 'nacl/common/nacl_types.h',
517 'nacl/common/nacl_types_param_traits.cc',
518 'nacl/common/nacl_types_param_traits.h',
519 'nacl/common/pnacl_types.cc',
520 'nacl/common/pnacl_types.h',
526 '../content/content.gyp:content_common',