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/prcpucfg.h',
21 'third_party/nspr/prcpucfg_freebsd.h',
22 'third_party/nspr/prcpucfg_linux.h',
23 'third_party/nspr/prcpucfg_mac.h',
24 'third_party/nspr/prcpucfg_nacl.h',
25 'third_party/nspr/prcpucfg_openbsd.h',
26 'third_party/nspr/prcpucfg_solaris.h',
27 'third_party/nspr/prcpucfg_win.h',
28 'third_party/nspr/prtime.cc',
29 'third_party/nspr/prtime.h',
30 'third_party/nspr/prtypes.h',
31 'third_party/xdg_mime/xdgmime.h',
32 'allocator/allocator_extension.cc',
33 'allocator/allocator_extension.h',
34 'allocator/type_profiler_control.cc',
35 'allocator/type_profiler_control.h',
36 'android/base_jni_registrar.cc',
37 'android/base_jni_registrar.h',
38 'android/build_info.cc',
39 'android/build_info.h',
40 'android/cpu_features.cc',
41 'android/scoped_java_ref.cc',
42 'android/scoped_java_ref.h',
43 'android/jni_android.cc',
44 'android/jni_android.h',
45 'android/jni_array.cc',
46 'android/jni_array.h',
47 'android/jni_helper.cc',
48 'android/jni_helper.h',
49 'android/jni_registrar.cc',
50 'android/jni_registrar.h',
51 'android/jni_string.cc',
52 'android/jni_string.h',
53 'android/locale_utils.cc',
54 'android/locale_utils.h',
55 'android/path_service_android.cc',
56 'android/path_service_android.h',
57 'android/path_utils.cc',
58 'android/path_utils.h',
59 'android/thread_utils.h',
63 'atomic_sequence_num.h',
65 'atomicops_internals_gcc.h',
66 'atomicops_internals_mac.h',
67 'atomicops_internals_tsan.h',
68 'atomicops_internals_x86_gcc.cc',
69 'atomicops_internals_x86_gcc.h',
70 'atomicops_internals_x86_msvc.h',
74 'base_paths_android.cc',
75 'base_paths_android.h',
78 'base_paths_posix.cc',
90 'bind_internal_win.h',
96 'callback_internal.cc',
97 'callback_internal.h',
98 'cancelable_callback.h',
99 'chromeos/chromeos_version.cc',
100 'chromeos/chromeos_version.h',
103 'compiler_specific.h',
104 'containers/linked_list.h',
105 'containers/mru_cache.h',
106 'containers/small_map.h',
107 'containers/stack_container.h',
110 'critical_closure.h',
111 'critical_closure_ios.mm',
114 'debug/crash_logging.cc',
115 'debug/crash_logging.h',
116 'debug/debug_on_start_win.cc',
117 'debug/debug_on_start_win.h',
120 'debug/debugger_posix.cc',
121 'debug/debugger_win.cc',
122 # This file depends on files from the 'allocator' target,
123 # but this target does not depend on 'allocator' (see
124 # allocator.gyp for details).
125 'debug/leak_annotations.h',
126 'debug/leak_tracker.h',
129 'debug/stack_trace.cc',
130 'debug/stack_trace.h',
131 'debug/stack_trace_android.cc',
132 'debug/stack_trace_ios.mm',
133 'debug/stack_trace_posix.cc',
134 'debug/stack_trace_win.cc',
135 'debug/trace_event.h',
136 'debug/trace_event_android.cc',
137 'debug/trace_event_impl.cc',
138 'debug/trace_event_impl.h',
139 'debug/trace_event_internal.h',
140 'debug/trace_event_win.cc',
143 'file_descriptor_posix.h',
146 'file_util_android.cc',
147 'file_util_linux.cc',
149 'file_util_posix.cc',
151 'file_version_info.h',
152 'file_version_info_mac.h',
153 'file_version_info_mac.mm',
154 'file_version_info_win.cc',
155 'file_version_info_win.h',
156 'files/dir_reader_fallback.h',
157 'files/dir_reader_linux.h',
158 'files/dir_reader_posix.h',
159 'files/file_path.cc',
161 'files/file_path_watcher.cc',
162 'files/file_path_watcher.h',
163 'files/file_path_watcher_kqueue.cc',
164 'files/file_path_watcher_linux.cc',
165 'files/file_path_watcher_stub.cc',
166 'files/file_path_watcher_win.cc',
167 'files/file_util_proxy.cc',
168 'files/file_util_proxy.h',
169 'files/important_file_writer.h',
170 'files/important_file_writer.cc',
171 'files/memory_mapped_file.cc',
172 'files/memory_mapped_file.h',
173 'files/memory_mapped_file_posix.cc',
174 'files/memory_mapped_file_win.cc',
175 'files/scoped_temp_dir.cc',
176 'files/scoped_temp_dir.h',
187 'hi_res_timer_manager_posix.cc',
188 'hi_res_timer_manager_win.cc',
189 'hi_res_timer_manager.h',
192 'ios/device_util.mm',
195 'ios/scoped_critical_action.h',
196 'ios/scoped_critical_action.mm',
197 'json/json_file_value_serializer.cc',
198 'json/json_file_value_serializer.h',
199 'json/json_parser.cc',
200 'json/json_parser.h',
201 'json/json_reader.cc',
202 'json/json_reader.h',
203 'json/json_string_value_serializer.cc',
204 'json/json_string_value_serializer.h',
205 'json/json_value_converter.h',
206 'json/json_writer.cc',
207 'json/json_writer.h',
208 'json/string_escape.cc',
209 'json/string_escape.h',
218 'mac/authorization_util.h',
219 'mac/authorization_util.mm',
220 'mac/bind_objc_block.h',
221 'mac/bundle_locations.h',
222 'mac/bundle_locations.mm',
223 'mac/cocoa_protocols.h',
224 'mac/foundation_util.h',
225 'mac/foundation_util.mm',
228 'mac/libdispatch_task_runner.cc',
229 'mac/libdispatch_task_runner.h',
231 'mac/mac_logging.cc',
234 'mac/objc_property_releaser.h',
235 'mac/objc_property_releaser.mm',
236 'mac/os_crash_dumps.cc',
237 'mac/os_crash_dumps.h',
238 'mac/scoped_aedesc.h',
239 'mac/scoped_authorizationref.h',
240 'mac/scoped_block.h',
241 'mac/scoped_cftyperef.h',
242 'mac/scoped_ioobject.h',
243 'mac/scoped_launch_data.h',
244 'mac/scoped_mach_port.cc',
245 'mac/scoped_mach_port.h',
246 'mac/scoped_nsautorelease_pool.h',
247 'mac/scoped_nsautorelease_pool.mm',
248 'mac/scoped_nsexception_enabler.h',
249 'mac/scoped_nsexception_enabler.mm',
250 'mac/scoped_sending_event.h',
251 'mac/scoped_sending_event.mm',
254 'memory/aligned_memory.cc',
255 'memory/aligned_memory.h',
256 'memory/discardable_memory.cc',
257 'memory/discardable_memory.h',
258 'memory/discardable_memory_android.cc',
259 'memory/discardable_memory_mac.cc',
260 'memory/linked_ptr.h',
261 'memory/manual_constructor.h',
262 'memory/raw_scoped_refptr_mismatch_checker.h',
263 'memory/ref_counted.cc',
264 'memory/ref_counted.h',
265 'memory/ref_counted_memory.cc',
266 'memory/ref_counted_memory.h',
267 'memory/scoped_handle.h',
268 'memory/scoped_nsobject.h',
269 'memory/scoped_open_process.h',
270 'memory/scoped_policy.h',
271 'memory/scoped_ptr.h',
272 'memory/scoped_vector.h',
273 'memory/singleton.cc',
274 'memory/singleton.h',
275 'memory/weak_ptr.cc',
279 'message_loop_proxy.cc',
280 'message_loop_proxy.h',
281 'message_loop_proxy_impl.cc',
282 'message_loop_proxy_impl.h',
285 'message_pump_android.cc',
286 'message_pump_android.h',
287 'message_pump_default.cc',
288 'message_pump_default.h',
289 'message_pump_win.cc',
290 'message_pump_win.h',
291 'metrics/sample_map.cc',
292 'metrics/sample_map.h',
293 'metrics/sample_vector.cc',
294 'metrics/sample_vector.h',
295 'metrics/bucket_ranges.cc',
296 'metrics/bucket_ranges.h',
297 'metrics/histogram.cc',
298 'metrics/histogram.h',
299 'metrics/histogram_base.cc',
300 'metrics/histogram_base.h',
301 'metrics/histogram_flattener.h',
302 'metrics/histogram_samples.cc',
303 'metrics/histogram_samples.h',
304 'metrics/histogram_snapshot_manager.cc',
305 'metrics/histogram_snapshot_manager.h',
306 'metrics/sparse_histogram.cc',
307 'metrics/sparse_histogram.h',
308 'metrics/statistics_recorder.cc',
309 'metrics/statistics_recorder.h',
310 'metrics/stats_counters.cc',
311 'metrics/stats_counters.h',
312 'metrics/stats_table.cc',
313 'metrics/stats_table.h',
316 'native_library_mac.mm',
317 'native_library_posix.cc',
318 'native_library_win.cc',
320 'observer_list_threadsafe.h',
321 'os_compat_android.cc',
322 'os_compat_android.h',
333 'platform_file_posix.cc',
334 'platform_file_win.cc',
336 'posix/eintr_wrapper.h',
337 'posix/global_descriptors.cc',
338 'posix/global_descriptors.h',
339 'posix/unix_domain_socket_linux.cc',
340 'posix/unix_domain_socket_linux.h',
343 'process_info_mac.cc',
344 'process_info_win.cc',
349 'process_util_freebsd.cc',
350 'process_util_ios.mm',
351 'process_util_linux.cc',
352 'process_util_mac.mm',
353 'process_util_openbsd.cc',
354 'process_util_posix.cc',
355 'process_util_win.cc',
357 'profiler/scoped_profile.cc',
358 'profiler/scoped_profile.h',
359 'profiler/alternate_timer.cc',
360 'profiler/alternate_timer.h',
361 'profiler/tracked_time.cc',
362 'profiler/tracked_time.h',
366 'rand_util_posix.cc',
371 'safe_strerror_posix.cc',
372 'safe_strerror_posix.h',
373 'scoped_native_library.cc',
374 'scoped_native_library.h',
375 'sequence_checker.h',
376 'sequence_checker_impl.cc',
377 'sequence_checker_impl.h',
378 'sequenced_task_runner.cc',
379 'sequenced_task_runner.h',
380 'sequenced_task_runner_helpers.h',
385 'shared_memory_android.cc',
386 'shared_memory_nacl.cc',
387 'shared_memory_posix.cc',
388 'shared_memory_win.cc',
389 'single_thread_task_runner.h',
396 'string_util_posix.h',
402 'strings/string_split.cc',
403 'strings/string_split.h',
404 'strings/string_number_conversions.cc',
405 'strings/string_number_conversions.h',
406 'strings/string_tokenizer.h',
407 'strings/stringize_macros.h',
408 'strings/sys_string_conversions.h',
409 'strings/sys_string_conversions_mac.mm',
410 'strings/sys_string_conversions_posix.cc',
411 'strings/sys_string_conversions_win.cc',
412 'strings/utf_offset_string_conversions.cc',
413 'strings/utf_offset_string_conversions.h',
414 'strings/utf_string_conversion_utils.cc',
415 'strings/utf_string_conversion_utils.h',
416 'supports_user_data.cc',
417 'supports_user_data.h',
418 'synchronization/cancellation_flag.cc',
419 'synchronization/cancellation_flag.h',
420 'synchronization/condition_variable.h',
421 'synchronization/condition_variable_posix.cc',
422 'synchronization/condition_variable_win.cc',
423 'synchronization/lock.cc',
424 'synchronization/lock.h',
425 'synchronization/lock_impl.h',
426 'synchronization/lock_impl_posix.cc',
427 'synchronization/lock_impl_win.cc',
428 'synchronization/spin_wait.h',
429 'synchronization/waitable_event.h',
430 'synchronization/waitable_event_posix.cc',
431 'synchronization/waitable_event_watcher.h',
432 'synchronization/waitable_event_watcher_posix.cc',
433 'synchronization/waitable_event_watcher_win.cc',
434 'synchronization/waitable_event_win.cc',
435 'system_monitor/system_monitor.cc',
436 'system_monitor/system_monitor.h',
437 'system_monitor/system_monitor_android.cc',
438 'system_monitor/system_monitor_android.h',
439 'system_monitor/system_monitor_ios.mm',
440 'system_monitor/system_monitor_mac.mm',
441 'system_monitor/system_monitor_posix.cc',
442 'system_monitor/system_monitor_win.cc',
446 'sys_info_android.cc',
447 'sys_info_chromeos.cc',
448 'sys_info_freebsd.cc',
452 'sys_info_openbsd.cc',
457 'task_runner_util.h',
459 'thread_task_runner_handle.cc',
460 'thread_task_runner_handle.h',
461 'threading/non_thread_safe.h',
462 'threading/non_thread_safe_impl.cc',
463 'threading/non_thread_safe_impl.h',
464 'threading/platform_thread.h',
465 'threading/platform_thread_mac.mm',
466 'threading/platform_thread_posix.cc',
467 'threading/platform_thread_win.cc',
468 'threading/post_task_and_reply_impl.cc',
469 'threading/post_task_and_reply_impl.h',
470 'threading/sequenced_worker_pool.cc',
471 'threading/sequenced_worker_pool.h',
472 'threading/simple_thread.cc',
473 'threading/simple_thread.h',
474 'threading/thread.cc',
475 'threading/thread.h',
476 'threading/thread_checker.h',
477 'threading/thread_checker_impl.cc',
478 'threading/thread_checker_impl.h',
479 'threading/thread_collision_warner.cc',
480 'threading/thread_collision_warner.h',
481 'threading/thread_id_name_manager.cc',
482 'threading/thread_id_name_manager.h',
483 'threading/thread_local.h',
484 'threading/thread_local_posix.cc',
485 'threading/thread_local_storage.h',
486 'threading/thread_local_storage_posix.cc',
487 'threading/thread_local_storage_win.cc',
488 'threading/thread_local_win.cc',
489 'threading/thread_restrictions.h',
490 'threading/thread_restrictions.cc',
491 'threading/watchdog.cc',
492 'threading/watchdog.h',
493 'threading/worker_pool.h',
494 'threading/worker_pool.cc',
495 'threading/worker_pool_posix.cc',
496 'threading/worker_pool_posix.h',
497 'threading/worker_pool_win.cc',
500 'time/default_clock.cc',
501 'time/default_clock.h',
502 'time/default_tick_clock.cc',
503 'time/default_tick_clock.h',
504 'time/tick_clock.cc',
506 # TODO(akalin): Move time* into time/.
514 'tracked_objects.cc',
519 'utf_string_conversions.cc',
520 'utf_string_conversions.h',
523 'value_conversions.cc',
524 'value_conversions.h',
529 'nix/mime_util_xdg.cc',
530 'nix/mime_util_xdg.h',
533 'win/enum_variant.h',
534 'win/enum_variant.cc',
535 'win/event_trace_consumer.h',
536 'win/event_trace_controller.cc',
537 'win/event_trace_controller.h',
538 'win/event_trace_provider.cc',
539 'win/event_trace_provider.h',
542 'win/iat_patch_function.cc',
543 'win/iat_patch_function.h',
544 'win/iunknown_impl.h',
545 'win/iunknown_impl.cc',
548 'win/object_watcher.cc',
549 'win/object_watcher.h',
552 'win/resource_util.cc',
553 'win/resource_util.h',
554 'win/sampling_profiler.cc',
555 'win/sampling_profiler.h',
556 'win/scoped_bstr.cc',
558 'win/scoped_co_mem.h',
559 'win/scoped_com_initializer.h',
560 'win/scoped_comptr.h',
561 'win/scoped_gdi_object.h',
562 'win/scoped_handle.cc',
563 'win/scoped_handle.h',
565 'win/scoped_hglobal.h',
566 'win/scoped_process_information.cc',
567 'win/scoped_process_information.h',
568 'win/scoped_propvariant.h',
569 'win/scoped_select_object.h',
570 'win/scoped_variant.cc',
571 'win/scoped_variant.h',
574 'win/startup_information.cc',
575 'win/startup_information.h',
576 'win/text_services_message_filter.cc',
577 'win/text_services_message_filter.h',
578 'win/windows_version.cc',
579 'win/windows_version.h',
582 'win/wrapped_window_proc.cc',
583 'win/wrapped_window_proc.h',
586 'BASE_IMPLEMENTATION',
591 'msvs_disabled_warnings': [
594 'target_conditions': [
595 ['<(use_glib)==0 or >(nacl_untrusted_build)==1', {
597 ['exclude', '^nix/'],
600 'atomicops_internals_x86_gcc.cc',
601 'message_pump_glib.cc',
602 'message_pump_aurax11.cc',
605 ['<(toolkit_uses_gtk)==0 or >(nacl_untrusted_build)==1', {
606 'sources!': ['message_pump_gtk.cc'],
608 ['(OS != "linux" and <(os_bsd) != 1 and OS != "android") or >(nacl_untrusted_build)==1', {
610 # Not automatically excluded by the *linux.cc rules.
615 ['>(nacl_untrusted_build)==1', {
617 'allocator/type_profiler_control.cc',
618 'allocator/type_profiler_control.h',
622 'debug/stack_trace_posix.cc',
624 'file_util_posix.cc',
625 'file_util_proxy.cc',
626 'files/file_path_watcher_kqueue.cc',
627 'native_library_posix.cc',
629 'platform_file_posix.cc',
630 'posix/unix_domain_socket_linux.cc',
633 'process_util_posix.cc',
634 'rand_util_posix.cc',
635 'scoped_native_library.cc',
636 'files/scoped_temp_dir.cc',
637 'shared_memory_posix.cc',
639 'threading/sequenced_worker_pool.cc',
640 'third_party/dynamic_annotations/dynamic_annotations.c',
642 # Metrics won't work in the NaCl sandbox.
643 'sources/': [ ['exclude', '^metrics/'] ],
645 ['OS == "android" and >(nacl_untrusted_build)==0', {
647 'base_paths_posix.cc',
648 'files/file_path_watcher_kqueue.cc',
649 'files/file_path_watcher_stub.cc',
650 'system_monitor/system_monitor_posix.cc',
653 ['include', '^files/file_path_watcher_linux\\.cc$'],
654 ['include', '^process_util_linux\\.cc$'],
655 ['include', '^posix/unix_domain_socket_linux\\.cc$'],
656 ['include', '^strings/sys_string_conversions_posix\\.cc$'],
657 ['include', '^sys_info_linux\\.cc$'],
658 ['include', '^worker_pool_linux\\.cc$'],
663 # Pull in specific Mac files for iOS (which have been filtered out
664 # by file name rules).
665 ['include', '^atomicops_internals_mac\\.'],
666 ['include', '^base_paths_mac\\.'],
667 ['include', '^file_util_mac\\.'],
668 ['include', '^file_version_info_mac\\.'],
669 ['include', '^mac/bundle_locations\\.'],
670 ['include', '^mac/foundation_util\\.'],
671 ['include', '^mac/mac_logging\\.'],
672 ['include', '^mac/objc_property_releaser\\.'],
673 ['include', '^mac/scoped_mach_port\\.'],
674 ['include', '^mac/scoped_nsautorelease_pool\\.'],
675 ['include', '^memory/discardable_memory_mac\\.'],
676 ['include', '^message_pump_mac\\.'],
677 ['include', '^threading/platform_thread_mac\\.'],
678 ['include', '^strings/sys_string_conversions_mac\\.'],
679 ['include', '^time_mac\\.'],
680 ['include', '^worker_pool_mac\\.'],
681 # Exclude all process_util except the minimal implementation
682 # needed on iOS (mostly for unit tests).
683 ['exclude', '^process_util'],
684 ['include', '^process_util_ios\\.mm$'],
687 'message_pump_libevent.cc'
690 ['OS != "mac" or >(nacl_untrusted_build)==1', {
692 'mac/scoped_aedesc.h'
695 # For now, just test the *BSD platforms enough to exclude them.
696 # Subsequent changes will include them further.
697 ['OS != "freebsd" or >(nacl_untrusted_build)==1', {
698 'sources/': [ ['exclude', '_freebsd\\.cc$'] ],
701 ['OS != "openbsd" or >(nacl_untrusted_build)==1', {
702 'sources/': [ ['exclude', '_openbsd\\.cc$'] ],
705 ['OS != "win" or >(nacl_untrusted_build)==1', {
706 'sources/': [ ['exclude', '^win/'] ],
709 ['OS != "android" or >(nacl_untrusted_build)==1', {
710 'sources/': [ ['exclude', '^android/'] ],
713 ['OS == "win" and >(nacl_untrusted_build)==0', {
715 '<(DEPTH)/third_party/wtl/include',
718 'event_recorder_stubs.cc',
719 'files/file_path_watcher_kqueue.cc',
720 'files/file_path_watcher_stub.cc',
721 'message_pump_libevent.cc',
722 'posix/file_descriptor_shuffle.cc',
723 # Not using sha1_win.cc because it may have caused a
724 # regression to page cycler moz.
729 ['OS == "linux" and >(nacl_untrusted_build)==0', {
731 'files/file_path_watcher_kqueue.cc',
732 'files/file_path_watcher_stub.cc',
735 ['(OS == "mac" or OS == "ios") and >(nacl_untrusted_build)==0', {
737 ['exclude', '^files/file_path_watcher_stub\\.cc$'],
738 ['exclude', '^base_paths_posix\\.cc$'],
739 ['exclude', '^native_library_posix\\.cc$'],
740 ['exclude', '^strings/sys_string_conversions_posix\\.cc$'],
743 ['<(os_bsd)==1 and >(nacl_untrusted_build)==0', {
745 ['exclude', '^files/file_path_watcher_linux\\.cc$'],
746 ['exclude', '^files/file_path_watcher_stub\\.cc$'],
747 ['exclude', '^file_util_linux\\.cc$'],
748 ['exclude', '^process_linux\\.cc$'],
749 ['exclude', '^process_util_linux\\.cc$'],
750 ['exclude', '^sys_info_linux\\.cc$'],
753 ['<(chromeos)!=1 or >(nacl_untrusted_build)==1', {
755 ['exclude', '^chromeos/'],
758 # Remove all unnecessary files for build_nexe.py to avoid exceeding
759 # command-line-string limitation when building NaCl on Windows.
760 ['OS == "win" and >(nacl_untrusted_build)==1', {
761 'sources/': [ ['exclude', '\\.h$'] ],
763 ['<(use_system_nspr)==1 and >(nacl_untrusted_build)==0', {
765 ['exclude', '^third_party/nspr/'],