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 '../ppapi/ppapi_internal.gyp:ppapi_shared',
82 '../ppapi/ppapi_internal.gyp:ppapi_ipc',
83 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome',
86 ['disable_nacl_untrusted==0', {
88 '../ppapi/native_client/native_client.gyp:nacl_irt',
89 '../ppapi/native_client/src/untrusted/pnacl_support_extension/pnacl_support_extension.gyp:pnacl_support_extension',
93 'direct_dependent_settings': {
100 'target_name': 'nacl_browser',
101 'type': 'static_library',
103 'nacl/browser/nacl_broker_host_win.cc',
104 'nacl/browser/nacl_broker_host_win.h',
105 'nacl/browser/nacl_broker_service_win.cc',
106 'nacl/browser/nacl_broker_service_win.h',
107 'nacl/browser/nacl_browser.cc',
108 'nacl/browser/nacl_browser.h',
109 'nacl/browser/nacl_file_host.cc',
110 'nacl/browser/nacl_file_host.h',
111 'nacl/browser/nacl_host_message_filter.cc',
112 'nacl/browser/nacl_host_message_filter.h',
113 'nacl/browser/nacl_process_host.cc',
114 'nacl/browser/nacl_process_host.h',
115 'nacl/browser/nacl_validation_cache.cc',
116 'nacl/browser/nacl_validation_cache.h',
117 'nacl/browser/pnacl_host.cc',
118 'nacl/browser/pnacl_host.h',
119 'nacl/browser/pnacl_translation_cache.cc',
120 'nacl/browser/pnacl_translation_cache.h',
121 'nacl/common/nacl_debug_exception_handler_win.cc',
122 'nacl/common/nacl_debug_exception_handler_win.h',
130 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel',
131 '../content/content.gyp:content_browser',
136 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
137 'msvs_disabled_warnings': [4267, ],
141 '../components/nacl/zygote/nacl_fork_delegate_linux.cc',
142 '../components/nacl/zygote/nacl_fork_delegate_linux.h',
145 # Required by nacl_fork_delegate_linux.cc.
146 '../sandbox/sandbox.gyp:suid_sandbox_client',
152 'target_name': 'nacl_renderer',
153 'type': 'static_library',
155 'nacl/renderer/file_downloader.cc',
156 'nacl/renderer/file_downloader.h',
157 'nacl/renderer/histogram.cc',
158 'nacl/renderer/histogram.h',
159 'nacl/renderer/manifest_downloader.cc',
160 'nacl/renderer/manifest_downloader.h',
161 'nacl/renderer/manifest_service_channel.cc',
162 'nacl/renderer/manifest_service_channel.h',
163 'nacl/renderer/nacl_helper.cc',
164 'nacl/renderer/nacl_helper.h',
165 'nacl/renderer/json_manifest.cc',
166 'nacl/renderer/json_manifest.h',
167 'nacl/renderer/nexe_load_manager.cc',
168 'nacl/renderer/nexe_load_manager.h',
169 'nacl/renderer/platform_info.cc',
170 'nacl/renderer/platform_info.h',
171 'nacl/renderer/pnacl_translation_resource_host.cc',
172 'nacl/renderer/pnacl_translation_resource_host.h',
173 'nacl/renderer/ppb_nacl_private_impl.cc',
174 'nacl/renderer/ppb_nacl_private_impl.h',
175 'nacl/renderer/progress_event.cc',
176 'nacl/renderer/progress_event.h',
177 'nacl/renderer/trusted_plugin_channel.cc',
178 'nacl/renderer/trusted_plugin_channel.h',
185 '../content/content.gyp:content_renderer',
186 '../ppapi/native_client/src/trusted/plugin/plugin.gyp:nacl_trusted_plugin',
187 '../third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
188 '../third_party/WebKit/public/blink.gyp:blink',
193 'direct_dependent_settings': {
200 'target_name': 'nacl_loader_unittests',
201 'type': '<(gtest_target_type)',
203 'nacl/loader/run_all_unittests.cc',
207 '../base/base.gyp:test_support_base',
208 '../testing/gtest.gyp:gtest',
213 # TODO(mazda): Move this to browser_tests once we have
214 # established a way to run browser_tests on ARM Chrome OS
215 # devices (http://crbug.com/364729).
216 'nacl/loader/nonsfi/irt_icache_unittest.cc',
217 # TODO(hamaji): Currently, we build them twice. Stop building
218 # them for components_unittests. See crbug.com/364751
219 'nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc',
220 'nacl/loader/nonsfi/nonsfi_sandbox_sigsys_unittest.cc',
224 '../sandbox/sandbox.gyp:sandbox_linux_test_utils',
234 'target_name': 'nacl_helper',
235 'type': 'executable',
240 'nacl/loader/nacl_helper_linux.cc',
241 'nacl/loader/nacl_helper_linux.h',
248 # Do not pick the default ASan options from
249 # build/sanitizers/sanitizer_options.cc to avoid a conflict with
250 # those in nacl/nacl_helper_linux.cc.
251 '-Wl,-u_sanitizer_options_link_helper',
257 'target_name': 'nacl_linux',
258 'type': 'static_library',
264 # Allow .cc files to know if they're being compiled as part
269 'nacl/loader/nonsfi/abi_conversion.cc',
270 'nacl/loader/nonsfi/abi_conversion.h',
271 'nacl/loader/nonsfi/elf_loader.cc',
272 'nacl/loader/nonsfi/elf_loader.h',
273 'nacl/loader/nonsfi/irt_basic.cc',
274 'nacl/loader/nonsfi/irt_clock.cc',
275 'nacl/loader/nonsfi/irt_exception_handling.cc',
276 'nacl/loader/nonsfi/irt_fdio.cc',
277 'nacl/loader/nonsfi/irt_futex.cc',
278 'nacl/loader/nonsfi/irt_icache.cc',
279 'nacl/loader/nonsfi/irt_interfaces.cc',
280 'nacl/loader/nonsfi/irt_interfaces.h',
281 'nacl/loader/nonsfi/irt_memory.cc',
282 'nacl/loader/nonsfi/irt_ppapi.cc',
283 'nacl/loader/nonsfi/irt_random.cc',
284 'nacl/loader/nonsfi/irt_resource_open.cc',
285 'nacl/loader/nonsfi/irt_thread.cc',
286 'nacl/loader/nonsfi/irt_util.h',
287 'nacl/loader/nonsfi/nonsfi_listener.cc',
288 'nacl/loader/nonsfi/nonsfi_listener.h',
289 'nacl/loader/nonsfi/nonsfi_main.cc',
290 'nacl/loader/nonsfi/nonsfi_main.h',
291 'nacl/loader/nonsfi/nonsfi_sandbox.cc',
292 'nacl/loader/nonsfi/nonsfi_sandbox.h',
293 'nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc',
294 'nacl/loader/sandbox_linux/nacl_sandbox_linux.cc',
295 '../ppapi/nacl_irt/irt_manifest.h',
296 '../ppapi/nacl_irt/manifest_service.cc',
297 '../ppapi/nacl_irt/manifest_service.h',
298 '../ppapi/nacl_irt/plugin_main.cc',
299 '../ppapi/nacl_irt/plugin_main.h',
300 '../ppapi/nacl_irt/plugin_startup.cc',
301 '../ppapi/nacl_irt/plugin_startup.h',
302 '../ppapi/nacl_irt/ppapi_dispatcher.cc',
303 '../ppapi/nacl_irt/ppapi_dispatcher.h',
309 '../components/tracing.gyp:tracing',
310 '../crypto/crypto.gyp:crypto',
311 '../sandbox/sandbox.gyp:libc_urandom_override',
312 '../sandbox/sandbox.gyp:sandbox',
313 '../ppapi/ppapi_internal.gyp:ppapi_proxy',
318 '../build/linux/system.gyp:glib',
321 ['os_posix == 1 and OS != "mac"', {
323 ['use_allocator!="none"', {
325 '../base/allocator/allocator.gyp:allocator',
330 ['use_seccomp_bpf == 0', {
332 '../content/common/sandbox_linux/sandbox_bpf_base_policy_linux.cc',
333 '../content/common/sandbox_linux/sandbox_init_linux.cc',
336 'defines': ['USE_SECCOMP_BPF'],
343 ['OS=="win" and target_arch=="ia32"', {
346 'target_name': 'nacl_win64',
347 'type': 'static_library',
353 '../native_client/src/trusted/service_runtime/service_runtime.gyp:sel_main_chrome64',
354 '../ppapi/ppapi_internal.gyp:ppapi_shared_win64',
355 '../ppapi/ppapi_internal.gyp:ppapi_ipc_win64',
357 'export_dependent_settings': [
358 '../ppapi/ppapi_internal.gyp:ppapi_ipc_win64',
361 '../components/nacl/broker/nacl_broker_listener.cc',
362 '../components/nacl/broker/nacl_broker_listener.h',
363 '../components/nacl/common/nacl_debug_exception_handler_win.cc',
364 '../components/nacl/loader/nacl_helper_win_64.cc',
365 '../components/nacl/loader/nacl_helper_win_64.h',
371 '<@(nacl_win64_defines)',
372 'COMPILE_CONTENT_STATICALLY',
376 'msvs_target_platform': 'x64',
379 'direct_dependent_settings': {
386 'target_name': 'nacl_switches_win64',
387 'type': 'static_library',
389 'nacl/common/nacl_switches.cc',
390 'nacl/common/nacl_switches.h',
397 'msvs_target_platform': 'x64',
402 'target_name': 'nacl_common_win64',
403 'type': 'static_library',
405 'COMPILE_CONTENT_STATICALLY',
408 'nacl/common/nacl_cmd_line.cc',
409 'nacl/common/nacl_cmd_line.h',
410 'nacl/common/nacl_constants.cc',
411 'nacl/common/nacl_constants.h',
412 'nacl/common/nacl_messages.cc',
413 'nacl/common/nacl_messages.h',
414 'nacl/common/nacl_renderer_messages.h',
415 'nacl/common/nacl_renderer_messages.cc',
416 'nacl/common/nacl_types.cc',
417 'nacl/common/nacl_types.h',
424 'msvs_target_platform': 'x64',
431 }, { # else (disable_nacl==1)
434 'target_name': 'nacl',
443 'target_name': 'nacl_win64',
448 'target_name': 'nacl_switches_win64',
456 ['disable_nacl!=1 and test_isolation_mode!="noop"', {
459 'target_name': 'nacl_loader_unittests_run',
462 'nacl_loader_unittests',
465 '../build/isolate.gypi',
468 'nacl_loader_unittests.isolate',
476 'target_name': 'nacl_switches',
477 'type': 'static_library',
479 'nacl/common/nacl_switches.cc',
480 'nacl/common/nacl_switches.h',
487 'target_name': 'nacl_common',
488 'type': 'static_library',
490 'nacl/common/nacl_cmd_line.cc',
491 'nacl/common/nacl_cmd_line.h',
492 'nacl/common/nacl_constants.cc',
493 'nacl/common/nacl_constants.h',
494 'nacl/common/nacl_host_messages.h',
495 'nacl/common/nacl_host_messages.cc',
496 'nacl/common/nacl_messages.cc',
497 'nacl/common/nacl_messages.h',
498 'nacl/common/nacl_nonsfi_util.cc',
499 'nacl/common/nacl_nonsfi_util.h',
500 'nacl/common/nacl_process_type.h',
501 'nacl/common/nacl_renderer_messages.h',
502 'nacl/common/nacl_renderer_messages.cc',
503 'nacl/common/nacl_sandbox_type_mac.h',
504 'nacl/common/nacl_types.cc',
505 'nacl/common/nacl_types.h',
506 'nacl/common/pnacl_types.cc',
507 'nacl/common/pnacl_types.h',
513 '../content/content.gyp:content_common',