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.
10 'target_conditions': [
11 # This part is shared between the targets defined below.
14 '../build/build_config.h',
15 'third_party/dmg_fp/dmg_fp.h',
16 'third_party/dmg_fp/g_fmt.cc',
17 'third_party/dmg_fp/dtoa_wrapper.cc',
18 'third_party/icu/icu_utf.cc',
19 'third_party/icu/icu_utf.h',
20 'third_party/nspr/prtime.cc',
21 'third_party/nspr/prtime.h',
22 'third_party/nspr/prcpucfg_linux.h',
23 'third_party/xdg_mime/xdgmime.h',
24 'allocator/allocator_extension.cc',
25 'allocator/allocator_extension.h',
26 'allocator/type_profiler_control.cc',
27 'allocator/type_profiler_control.h',
28 'android/base_jni_registrar.cc',
29 'android/base_jni_registrar.h',
30 'android/build_info.cc',
31 'android/build_info.h',
32 'android/scoped_java_ref.cc',
33 'android/scoped_java_ref.h',
34 'android/jni_android.cc',
35 'android/jni_android.h',
36 'android/jni_array.cc',
37 'android/jni_array.h',
38 'android/jni_helper.cc',
39 'android/jni_helper.h',
40 'android/jni_registrar.cc',
41 'android/jni_registrar.h',
42 'android/jni_string.cc',
43 'android/jni_string.h',
44 'android/locale_utils.cc',
45 'android/locale_utils.h',
46 'android/path_service_android.cc',
47 'android/path_service_android.h',
48 'android/path_utils.cc',
49 'android/path_utils.h',
53 'atomic_sequence_num.h',
55 'atomicops_internals_gcc.h',
56 'atomicops_internals_mac.h',
57 'atomicops_internals_tsan.h',
58 'atomicops_internals_x86_gcc.cc',
59 'atomicops_internals_x86_gcc.h',
60 'atomicops_internals_x86_msvc.h',
64 'base_paths_android.cc',
65 'base_paths_android.h',
68 'base_paths_posix.cc',
80 'bind_internal_win.h',
86 'callback_internal.cc',
87 'callback_internal.h',
88 'cancelable_callback.h',
89 'chromeos/chromeos_version.cc',
90 'chromeos/chromeos_version.h',
93 'compiler_specific.h',
94 'containers/linked_list.h',
95 'containers/mru_cache.h',
96 'containers/small_map.h',
97 'containers/stack_container.h',
100 'critical_closure.h',
101 'critical_closure_ios.mm',
104 'debug/debug_on_start_win.cc',
105 'debug/debug_on_start_win.h',
108 'debug/debugger_posix.cc',
109 'debug/debugger_win.cc',
110 # This file depends on files from the 'allocator' target,
111 # but this target does not depend on 'allocator' (see
112 # allocator.gyp for details).
113 'debug/leak_annotations.h',
114 'debug/leak_tracker.h',
117 'debug/stack_trace.cc',
118 'debug/stack_trace.h',
119 'debug/stack_trace_android.cc',
120 'debug/stack_trace_ios.mm',
121 'debug/stack_trace_posix.cc',
122 'debug/stack_trace_win.cc',
123 'debug/trace_event.cc',
124 'debug/trace_event.h',
125 'debug/trace_event_android.cc',
126 'debug/trace_event_impl.cc',
127 'debug/trace_event_impl.h',
128 'debug/trace_event_win.cc',
131 'file_descriptor_posix.h',
136 'file_util_android.cc',
137 'file_util_linux.cc',
139 'file_util_posix.cc',
141 'file_util_proxy.cc',
143 'file_version_info.h',
144 'file_version_info_mac.h',
145 'file_version_info_mac.mm',
146 'file_version_info_win.cc',
147 'file_version_info_win.h',
148 'files/dir_reader_fallback.h',
149 'files/dir_reader_linux.h',
150 'files/dir_reader_posix.h',
151 'files/file_path_watcher.cc',
152 'files/file_path_watcher.h',
153 'files/file_path_watcher_kqueue.cc',
154 'files/file_path_watcher_linux.cc',
155 'files/file_path_watcher_stub.cc',
156 'files/file_path_watcher_win.cc',
157 'files/important_file_writer.h',
158 'files/important_file_writer.cc',
159 'files/scoped_temp_dir.cc',
160 'files/scoped_temp_dir.h',
171 'hi_res_timer_manager_posix.cc',
172 'hi_res_timer_manager_win.cc',
173 'hi_res_timer_manager.h',
176 'ios/device_util.mm',
179 'ios/scoped_critical_action.h',
180 'ios/scoped_critical_action.mm',
181 'json/json_file_value_serializer.cc',
182 'json/json_file_value_serializer.h',
183 'json/json_parser.cc',
184 'json/json_parser.h',
185 'json/json_reader.cc',
186 'json/json_reader.h',
187 'json/json_string_value_serializer.cc',
188 'json/json_string_value_serializer.h',
189 'json/json_value_converter.h',
190 'json/json_writer.cc',
191 'json/json_writer.h',
192 'json/string_escape.cc',
193 'json/string_escape.h',
202 'mac/authorization_util.h',
203 'mac/authorization_util.mm',
204 'mac/bind_objc_block.h',
205 'mac/bind_objc_block.mm',
206 'mac/bundle_locations.h',
207 'mac/bundle_locations.mm',
208 'mac/cocoa_protocols.h',
209 'mac/crash_logging.h',
210 'mac/crash_logging.mm',
211 'mac/foundation_util.h',
212 'mac/foundation_util.mm',
215 'mac/libdispatch_task_runner.cc',
216 'mac/libdispatch_task_runner.h',
218 'mac/mac_logging.cc',
221 'mac/objc_property_releaser.h',
222 'mac/objc_property_releaser.mm',
223 'mac/os_crash_dumps.cc',
224 'mac/os_crash_dumps.h',
225 'mac/scoped_aedesc.h',
226 'mac/scoped_authorizationref.h',
227 'mac/scoped_cftyperef.h',
228 'mac/scoped_ioobject.h',
229 'mac/scoped_launch_data.h',
230 'mac/scoped_mach_port.cc',
231 'mac/scoped_mach_port.h',
232 'mac/scoped_nsautorelease_pool.h',
233 'mac/scoped_nsautorelease_pool.mm',
234 'mac/scoped_nsexception_enabler.h',
235 'mac/scoped_nsexception_enabler.mm',
236 'mac/scoped_sending_event.h',
237 'mac/scoped_sending_event.mm',
240 'memory/aligned_memory.cc',
241 'memory/aligned_memory.h',
242 'memory/linked_ptr.h',
243 'memory/manual_constructor.h',
244 'memory/raw_scoped_refptr_mismatch_checker.h',
245 'memory/ref_counted.cc',
246 'memory/ref_counted.h',
247 'memory/ref_counted_memory.cc',
248 'memory/ref_counted_memory.h',
249 'memory/scoped_handle.h',
250 'memory/scoped_nsobject.h',
251 'memory/scoped_open_process.h',
252 'memory/scoped_policy.h',
253 'memory/scoped_ptr.h',
254 'memory/scoped_vector.h',
255 'memory/singleton.cc',
256 'memory/singleton.h',
257 'memory/weak_ptr.cc',
261 'message_loop_proxy.cc',
262 'message_loop_proxy.h',
263 'message_loop_proxy_impl.cc',
264 'message_loop_proxy_impl.h',
267 'message_pump_android.cc',
268 'message_pump_android.h',
269 'message_pump_default.cc',
270 'message_pump_default.h',
271 'message_pump_win.cc',
272 'message_pump_win.h',
273 'metrics/sample_map.cc',
274 'metrics/sample_map.h',
275 'metrics/sample_vector.cc',
276 'metrics/sample_vector.h',
277 'metrics/bucket_ranges.cc',
278 'metrics/bucket_ranges.h',
279 'metrics/histogram.cc',
280 'metrics/histogram.h',
281 'metrics/histogram_base.cc',
282 'metrics/histogram_base.h',
283 'metrics/histogram_flattener.h',
284 'metrics/histogram_samples.cc',
285 'metrics/histogram_samples.h',
286 'metrics/histogram_snapshot_manager.cc',
287 'metrics/histogram_snapshot_manager.h',
288 'metrics/sparse_histogram.cc',
289 'metrics/sparse_histogram.h',
290 'metrics/statistics_recorder.cc',
291 'metrics/statistics_recorder.h',
292 'metrics/stats_counters.cc',
293 'metrics/stats_counters.h',
294 'metrics/stats_table.cc',
295 'metrics/stats_table.h',
298 'native_library_mac.mm',
299 'native_library_posix.cc',
300 'native_library_win.cc',
302 'observer_list_threadsafe.h',
303 'os_compat_android.cc',
304 'os_compat_android.h',
315 'platform_file_posix.cc',
316 'platform_file_win.cc',
318 'posix/eintr_wrapper.h',
319 'posix/global_descriptors.cc',
320 'posix/global_descriptors.h',
321 'posix/unix_domain_socket.cc',
322 'posix/unix_domain_socket.h',
325 'process_info_mac.cc',
326 'process_info_win.cc',
331 'process_util_freebsd.cc',
332 'process_util_ios.mm',
333 'process_util_linux.cc',
334 'process_util_mac.mm',
335 'process_util_openbsd.cc',
336 'process_util_posix.cc',
337 'process_util_win.cc',
339 'profiler/scoped_profile.cc',
340 'profiler/scoped_profile.h',
341 'profiler/alternate_timer.cc',
342 'profiler/alternate_timer.h',
343 'profiler/tracked_time.cc',
344 'profiler/tracked_time.h',
348 'rand_util_posix.cc',
352 'safe_strerror_posix.cc',
353 'safe_strerror_posix.h',
354 'scoped_native_library.cc',
355 'scoped_native_library.h',
356 'sequenced_task_runner.cc',
357 'sequenced_task_runner.h',
358 'sequenced_task_runner_helpers.h',
363 'shared_memory_android.cc',
364 'shared_memory_nacl.cc',
365 'shared_memory_posix.cc',
366 'shared_memory_win.cc',
367 'single_thread_task_runner.h',
369 'string_number_conversions.cc',
370 'string_number_conversions.h',
375 'string_tokenizer.h',
378 'string_util_posix.h',
382 'stringize_macros.h',
385 'supports_user_data.cc',
386 'supports_user_data.h',
387 'synchronization/cancellation_flag.cc',
388 'synchronization/cancellation_flag.h',
389 'synchronization/condition_variable.h',
390 'synchronization/condition_variable_posix.cc',
391 'synchronization/condition_variable_win.cc',
392 'synchronization/lock.cc',
393 'synchronization/lock.h',
394 'synchronization/lock_impl.h',
395 'synchronization/lock_impl_posix.cc',
396 'synchronization/lock_impl_win.cc',
397 'synchronization/spin_wait.h',
398 'synchronization/waitable_event.h',
399 'synchronization/waitable_event_posix.cc',
400 'synchronization/waitable_event_watcher.h',
401 'synchronization/waitable_event_watcher_posix.cc',
402 'synchronization/waitable_event_watcher_win.cc',
403 'synchronization/waitable_event_win.cc',
404 'system_monitor/system_monitor.cc',
405 'system_monitor/system_monitor.h',
406 'system_monitor/system_monitor_android.cc',
407 'system_monitor/system_monitor_android.h',
408 'system_monitor/system_monitor_ios.mm',
409 'system_monitor/system_monitor_mac.mm',
410 'system_monitor/system_monitor_posix.cc',
411 'system_monitor/system_monitor_win.cc',
415 'sys_info_android.cc',
416 'sys_info_chromeos.cc',
417 'sys_info_freebsd.cc',
421 'sys_info_openbsd.cc',
424 'sys_string_conversions.h',
425 'sys_string_conversions_mac.mm',
426 'sys_string_conversions_posix.cc',
427 'sys_string_conversions_win.cc',
430 'task_runner_util.h',
432 'thread_task_runner_handle.cc',
433 'thread_task_runner_handle.h',
434 'threading/non_thread_safe.h',
435 'threading/non_thread_safe_impl.cc',
436 'threading/non_thread_safe_impl.h',
437 'threading/platform_thread.h',
438 'threading/platform_thread_mac.mm',
439 'threading/platform_thread_posix.cc',
440 'threading/platform_thread_win.cc',
441 'threading/post_task_and_reply_impl.cc',
442 'threading/post_task_and_reply_impl.h',
443 'threading/sequenced_worker_pool.cc',
444 'threading/sequenced_worker_pool.h',
445 'threading/simple_thread.cc',
446 'threading/simple_thread.h',
447 'threading/thread.cc',
448 'threading/thread.h',
449 'threading/thread_checker.h',
450 'threading/thread_checker_impl.cc',
451 'threading/thread_checker_impl.h',
452 'threading/thread_collision_warner.cc',
453 'threading/thread_collision_warner.h',
454 'threading/thread_local.h',
455 'threading/thread_local_posix.cc',
456 'threading/thread_local_storage.h',
457 'threading/thread_local_storage_posix.cc',
458 'threading/thread_local_storage_win.cc',
459 'threading/thread_local_win.cc',
460 'threading/thread_restrictions.h',
461 'threading/thread_restrictions.cc',
462 'threading/watchdog.cc',
463 'threading/watchdog.h',
464 'threading/worker_pool.h',
465 'threading/worker_pool.cc',
466 'threading/worker_pool_posix.cc',
467 'threading/worker_pool_posix.h',
468 'threading/worker_pool_win.cc',
476 'tracked_objects.cc',
481 'utf_offset_string_conversions.cc',
482 'utf_offset_string_conversions.h',
483 'utf_string_conversion_utils.cc',
484 'utf_string_conversion_utils.h',
485 'utf_string_conversions.cc',
486 'utf_string_conversions.h',
489 'value_conversions.cc',
490 'value_conversions.h',
495 'nix/mime_util_xdg.cc',
496 'nix/mime_util_xdg.h',
499 'win/enum_variant.h',
500 'win/enum_variant.cc',
501 'win/event_trace_consumer.h',
502 'win/event_trace_controller.cc',
503 'win/event_trace_controller.h',
504 'win/event_trace_provider.cc',
505 'win/event_trace_provider.h',
508 'win/iat_patch_function.cc',
509 'win/iat_patch_function.h',
510 'win/iunknown_impl.h',
511 'win/iunknown_impl.cc',
514 'win/object_watcher.cc',
515 'win/object_watcher.h',
518 'win/resource_util.cc',
519 'win/resource_util.h',
520 'win/sampling_profiler.cc',
521 'win/sampling_profiler.h',
522 'win/scoped_bstr.cc',
524 'win/scoped_co_mem.h',
525 'win/scoped_com_initializer.h',
526 'win/scoped_comptr.h',
527 'win/scoped_gdi_object.h',
528 'win/scoped_handle.cc',
529 'win/scoped_handle.h',
531 'win/scoped_hglobal.h',
532 'win/scoped_process_information.cc',
533 'win/scoped_process_information.h',
534 'win/scoped_select_object.h',
537 'win/startup_information.cc',
538 'win/startup_information.h',
539 'win/scoped_variant.cc',
540 'win/scoped_variant.h',
541 'win/text_services_message_filter.cc',
542 'win/text_services_message_filter.h',
543 'win/windows_version.cc',
544 'win/windows_version.h',
547 'win/wrapped_window_proc.cc',
548 'win/wrapped_window_proc.h',
551 'BASE_IMPLEMENTATION',
556 'msvs_disabled_warnings': [
559 'target_conditions': [
560 ['<(use_glib)==0 or >(nacl_untrusted_build)==1', {
562 ['exclude', '^nix/'],
565 'atomicops_internals_x86_gcc.cc',
566 'message_pump_glib.cc',
567 'message_pump_aurax11.cc',
570 ['<(toolkit_uses_gtk)==0 or >(nacl_untrusted_build)==1', {
571 'sources!': ['message_pump_gtk.cc'],
573 ['(OS != "linux" and <(os_bsd) != 1 and OS != "android") or >(nacl_untrusted_build)==1', {
575 # Not automatically excluded by the *linux.cc rules.
580 ['>(nacl_untrusted_build)==1', {
582 'allocator/type_profiler_control.cc',
583 'allocator/type_profiler_control.h',
587 'debug/stack_trace_posix.cc',
589 'file_util_posix.cc',
590 'file_util_proxy.cc',
591 'files/file_path_watcher_kqueue.cc',
592 'native_library_posix.cc',
594 'platform_file_posix.cc',
595 'posix/unix_domain_socket.cc',
598 'process_util_posix.cc',
599 'rand_util_posix.cc',
600 'scoped_native_library.cc',
601 'files/scoped_temp_dir.cc',
602 'shared_memory_posix.cc',
604 'threading/sequenced_worker_pool.cc',
605 'third_party/dynamic_annotations/dynamic_annotations.c',
607 # Metrics won't work in the NaCl sandbox.
608 'sources/': [ ['exclude', '^metrics/'] ],
610 ['OS == "android" and >(nacl_untrusted_build)==0', {
612 'base_paths_posix.cc',
613 'files/file_path_watcher_kqueue.cc',
614 'files/file_path_watcher_stub.cc',
615 'system_monitor/system_monitor_posix.cc',
618 ['include', '^files/file_path_watcher_linux\\.cc$'],
619 ['include', '^process_util_linux\\.cc$'],
620 ['include', '^sys_info_linux\\.cc$'],
621 ['include', '^sys_string_conversions_posix\\.cc$'],
622 ['include', '^worker_pool_linux\\.cc$'],
627 # Pull in specific Mac files for iOS (which have been filtered out
628 # by file name rules).
629 ['include', '^atomicops_internals_mac\\.'],
630 ['include', '^base_paths_mac\\.'],
631 ['include', '^file_util_mac\\.'],
632 ['include', '^file_version_info_mac\\.'],
633 ['include', '^mac/bind_objc_block\\.'],
634 ['include', '^mac/bundle_locations\\.'],
635 ['include', '^mac/foundation_util\\.'],
636 ['include', '^mac/mac_logging\\.'],
637 ['include', '^mac/objc_property_releaser\\.'],
638 ['include', '^mac/scoped_mach_port\\.'],
639 ['include', '^mac/scoped_nsautorelease_pool\\.'],
640 ['include', '^message_pump_mac\\.'],
641 ['include', '^threading/platform_thread_mac\\.'],
642 ['include', '^sys_string_conversions_mac\\.'],
643 ['include', '^time_mac\\.'],
644 ['include', '^worker_pool_mac\\.'],
645 # Exclude all process_util except the minimal implementation
646 # needed on iOS (mostly for unit tests).
647 ['exclude', '^process_util'],
648 ['include', '^process_util_ios\\.mm$'],
651 'message_pump_libevent.cc'
654 ['OS != "mac" or >(nacl_untrusted_build)==1', {
656 'mac/scoped_aedesc.h'
659 # For now, just test the *BSD platforms enough to exclude them.
660 # Subsequent changes will include them further.
661 ['OS != "freebsd" or >(nacl_untrusted_build)==1', {
662 'sources/': [ ['exclude', '_freebsd\\.cc$'] ],
665 ['OS != "openbsd" or >(nacl_untrusted_build)==1', {
666 'sources/': [ ['exclude', '_openbsd\\.cc$'] ],
669 ['OS != "win" or >(nacl_untrusted_build)==1', {
670 'sources/': [ ['exclude', '^win/'] ],
673 ['OS != "android" or >(nacl_untrusted_build)==1', {
674 'sources/': [ ['exclude', '^android/'] ],
677 ['OS == "win" and >(nacl_untrusted_build)==0', {
679 '<(DEPTH)/third_party/wtl/include',
682 'event_recorder_stubs.cc',
683 'files/file_path_watcher_kqueue.cc',
684 'files/file_path_watcher_stub.cc',
685 'message_pump_libevent.cc',
686 'posix/file_descriptor_shuffle.cc',
687 # Not using sha1_win.cc because it may have caused a
688 # regression to page cycler moz.
693 ['OS == "linux" and >(nacl_untrusted_build)==0', {
695 'files/file_path_watcher_kqueue.cc',
696 'files/file_path_watcher_stub.cc',
699 ['(OS == "mac" or OS == "ios") and >(nacl_untrusted_build)==0', {
701 ['exclude', '^files/file_path_watcher_stub\\.cc$'],
702 ['exclude', '^base_paths_posix\\.cc$'],
703 ['exclude', '^native_library_posix\\.cc$'],
704 ['exclude', '^sys_string_conversions_posix\\.cc$'],
707 ['<(os_bsd)==1 and >(nacl_untrusted_build)==0', {
709 ['exclude', '^files/file_path_watcher_linux\\.cc$'],
710 ['exclude', '^files/file_path_watcher_stub\\.cc$'],
711 ['exclude', '^file_util_linux\\.cc$'],
712 ['exclude', '^process_linux\\.cc$'],
713 ['exclude', '^process_util_linux\\.cc$'],
714 ['exclude', '^sys_info_linux\\.cc$'],
717 ['<(chromeos)!=1 or >(nacl_untrusted_build)==1', {
719 ['exclude', '^chromeos/'],
722 # Remove all unnecessary files for build_nexe.py to avoid exceeding
723 # command-line-string limitation when building NaCl on Windows.
724 ['OS == "win" and >(nacl_untrusted_build)==1', {
725 'sources/': [ ['exclude', '\\.h$'] ],