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 '../build/win_precompile.gypi',
15 'target_name': 'base',
16 'type': '<(component)',
17 'toolsets': ['host', 'target'],
20 'enable_wexit_time_destructors': 1,
25 'allocator/allocator.gyp:allocator_extension_thunks',
26 '../testing/gtest.gyp:gtest_prod',
27 '../third_party/modp_b64/modp_b64.gyp:modp_b64',
28 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
30 # TODO(gregoryd): direct_dependent_settings should be shared with the
31 # 64-bit target, but it doesn't work due to a bug in gyp
32 'direct_dependent_settings': {
38 ['desktop_linux == 1 or chromeos == 1', {
41 'sources/': [ ['include', '_chromeos\\.cc$'] ]
43 ['toolkit_uses_gtk==1', {
45 '../build/linux/system.gyp:gtk',
47 'export_dependent_settings': [
48 '../build/linux/system.gyp:gtk',
62 }, { # desktop_linux == 0 and chromeos == 0
64 ['exclude', '/xdg_user_dirs/'],
65 ['exclude', '_nss\\.cc$'],
70 '../build/linux/system.gyp:glib',
72 'export_dependent_settings': [
73 '../build/linux/system.gyp:glib',
78 '../build/linux/system.gyp:x11',
80 'export_dependent_settings': [
81 '../build/linux/system.gyp:x11',
84 ['use_aura==1 and use_x11==1', {
86 '../build/linux/system.gyp:xrandr',
88 'export_dependent_settings': [
89 '../build/linux/system.gyp:xrandr',
92 ['OS == "android" and _toolset == "host"', {
93 # Always build base as a static_library for host toolset, even if
94 # we're doing a component build. Specifically, we only care about the
95 # target toolset using components since that's what developers are
96 # focusing on. In theory we should do this more generally for all
97 # targets when building for host, but getting the gyp magic
98 # per-toolset for the "component" variable is hard, and we really only
100 'type': 'static_library',
101 # Base for host support is the minimum required to run the
102 # ssl false start blacklist tool. It requires further changes
103 # to generically support host builds (and tests).
104 # Note: when building for host, gyp has OS == "android",
105 # hence the *_android.cc files are included but the actual code
106 # doesn't have OS_ANDROID / ANDROID defined.
108 # Host build on linux depends on system.gyp::gtk as
109 # default linux build has TOOLKIT_GTK defined.
110 ['host_os == "linux"', {
112 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
115 '../build/linux/system.gyp:gtk',
117 'export_dependent_settings': [
118 '../build/linux/system.gyp:gtk',
121 ['host_os == "mac"', {
123 ['exclude', '^native_library_linux\\.cc$'],
124 ['exclude', '^process_util_linux\\.cc$'],
125 ['exclude', '^sys_info_linux\\.cc$'],
126 ['exclude', '^sys_string_conversions_linux\\.cc$'],
127 ['exclude', '^worker_pool_linux\\.cc$'],
132 ['OS == "android" and _toolset == "target"', {
134 ['target_arch == "ia32"', {
136 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
139 ['target_arch == "mipsel"', {
141 ['include', '^atomicops_internals_mips_gcc\\.cc$'],
147 '../third_party/ashmem/ashmem.gyp:ashmem',
155 'debug/stack_trace_posix.cc',
158 '../build/android/cpufeatures.gypi',
161 ['OS == "android" and _toolset == "target" and android_webview_build == 0', {
168 '/usr/local/include',
172 '-L/usr/local/lib -lexecinfo',
179 # We need rt for clock_gettime().
181 # For 'native_library_linux.cc'
186 ['linux_use_tcmalloc==0', {
190 'direct_dependent_settings': {
198 ['OS == "mac" or (OS == "ios" and _toolset == "host")', {
201 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
202 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
203 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
204 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
205 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
206 '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
207 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
211 '../third_party/mach_override/mach_override.gyp:mach_override',
214 ['OS == "ios" and _toolset != "host"', {
217 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
218 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
219 '$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
220 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
221 '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
225 ['OS != "win" and OS != "ios"', {
226 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
228 ['component=="shared_library"', {
232 'debug/debug_on_start_win.cc',
237 ['use_system_nspr==1', {
239 'third_party/nspr/nspr.gyp:nspr',
244 'third_party/nspr/prcpucfg.h',
245 'third_party/nspr/prcpucfg_win.h',
246 'third_party/nspr/prtypes.h',
247 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
248 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
249 'async_socket_io_handler.h',
250 'async_socket_io_handler_posix.cc',
251 'async_socket_io_handler_win.cc',
254 'event_recorder_stubs.cc',
255 'event_recorder_win.cc',
260 'message_loop/message_pump_android.cc',
261 'message_loop/message_pump_android.h',
262 'message_loop/message_pump_glib.cc',
263 'message_loop/message_pump_glib.h',
264 'message_loop/message_pump_gtk.cc',
265 'message_loop/message_pump_gtk.h',
266 'message_loop/message_pump_io_ios.cc',
267 'message_loop/message_pump_io_ios.h',
268 'message_loop/message_pump_observer.h',
269 'message_loop/message_pump_libevent.cc',
270 'message_loop/message_pump_libevent.h',
271 'message_loop/message_pump_mac.h',
272 'message_loop/message_pump_mac.mm',
273 'message_loop/message_pump_x11.cc',
274 'message_loop/message_pump_x11.h',
275 'metrics/field_trial.cc',
276 'metrics/field_trial.h',
277 'posix/file_descriptor_shuffle.cc',
278 'posix/file_descriptor_shuffle.h',
280 'sync_socket_win.cc',
281 'sync_socket_posix.cc',
285 'target_name': 'base_i18n',
286 'type': '<(component)',
288 'enable_wexit_time_destructors': 1,
293 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
294 '../third_party/icu/icu.gyp:icui18n',
295 '../third_party/icu/icu.gyp:icuuc',
298 ['toolkit_uses_gtk==1', {
300 # i18n/rtl.cc uses gtk
301 '../build/linux/system.gyp:gtk',
305 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
306 'msvs_disabled_warnings': [
311 'export_dependent_settings': [
315 'BASE_I18N_IMPLEMENTATION',
318 'i18n/base_i18n_export.h',
319 'i18n/bidi_line_iterator.cc',
320 'i18n/bidi_line_iterator.h',
321 'i18n/break_iterator.cc',
322 'i18n/break_iterator.h',
323 'i18n/char_iterator.cc',
324 'i18n/char_iterator.h',
325 'i18n/case_conversion.cc',
326 'i18n/case_conversion.h',
327 'i18n/file_util_icu.cc',
328 'i18n/file_util_icu.h',
329 'i18n/i18n_constants.cc',
330 'i18n/i18n_constants.h',
331 'i18n/icu_encoding_detection.cc',
332 'i18n/icu_encoding_detection.h',
333 'i18n/icu_string_conversions.cc',
334 'i18n/icu_string_conversions.h',
337 'i18n/number_formatting.cc',
338 'i18n/number_formatting.h',
341 'i18n/string_compare.cc',
342 'i18n/string_compare.h',
343 'i18n/string_search.cc',
344 'i18n/string_search.h',
345 'i18n/time_formatting.cc',
346 'i18n/time_formatting.h',
352 'target_name': 'base_message_loop_tests',
353 'type': 'static_library',
356 '../testing/gtest.gyp:gtest',
359 'message_loop/message_loop_test.cc',
360 'message_loop/message_loop_test.h',
364 'target_name': 'base_prefs',
365 'type': '<(component)',
367 'enable_wexit_time_destructors': 1,
373 'export_dependent_settings': [
377 'BASE_PREFS_IMPLEMENTATION',
380 'prefs/base_prefs_export.h',
381 'prefs/default_pref_store.cc',
382 'prefs/default_pref_store.h',
383 'prefs/json_pref_store.cc',
384 'prefs/json_pref_store.h',
385 'prefs/overlay_user_pref_store.cc',
386 'prefs/overlay_user_pref_store.h',
387 'prefs/persistent_pref_store.h',
388 'prefs/pref_change_registrar.cc',
389 'prefs/pref_change_registrar.h',
390 'prefs/pref_member.cc',
391 'prefs/pref_member.h',
392 'prefs/pref_notifier.h',
393 'prefs/pref_notifier_impl.cc',
394 'prefs/pref_notifier_impl.h',
395 'prefs/pref_observer.h',
396 'prefs/pref_registry.cc',
397 'prefs/pref_registry.h',
398 'prefs/pref_registry_simple.cc',
399 'prefs/pref_registry_simple.h',
400 'prefs/pref_service.cc',
401 'prefs/pref_service.h',
402 'prefs/pref_service_factory.cc',
403 'prefs/pref_service_factory.h',
404 'prefs/pref_store.cc',
405 'prefs/pref_store.h',
406 'prefs/pref_value_map.cc',
407 'prefs/pref_value_map.h',
408 'prefs/pref_value_store.cc',
409 'prefs/pref_value_store.h',
410 'prefs/scoped_user_pref_update.cc',
411 'prefs/scoped_user_pref_update.h',
412 'prefs/value_map_pref_store.cc',
413 'prefs/value_map_pref_store.h',
417 'target_name': 'base_prefs_test_support',
418 'type': 'static_library',
422 '../testing/gmock.gyp:gmock',
425 'prefs/mock_pref_change_callback.cc',
426 'prefs/pref_store_observer_mock.cc',
427 'prefs/pref_store_observer_mock.h',
428 'prefs/testing_pref_service.cc',
429 'prefs/testing_pref_service.h',
430 'prefs/testing_pref_store.cc',
431 'prefs/testing_pref_store.h',
435 # This is the subset of files from base that should not be used with a
436 # dynamic library. Note that this library cannot depend on base because
437 # base depends on base_static.
438 'target_name': 'base_static',
439 'type': 'static_library',
441 'enable_wexit_time_destructors': 1,
444 'toolsets': ['host', 'target'],
455 # Include this target for a main() function that simply instantiates
456 # and runs a base::TestSuite.
458 'target_name': 'run_all_unittests',
459 'type': 'static_library',
464 'test/run_all_unittests.cc',
468 'target_name': 'base_unittests',
469 'type': '<(gtest_target_type)',
472 'android/activity_status_unittest.cc',
473 'android/jni_android_unittest.cc',
474 'android/jni_array_unittest.cc',
475 'android/jni_string_unittest.cc',
476 'android/path_utils_unittest.cc',
477 'android/scoped_java_ref_unittest.cc',
478 'android/sys_utils_unittest.cc',
479 'async_socket_io_handler_unittest.cc',
480 'at_exit_unittest.cc',
481 'atomicops_unittest.cc',
482 'barrier_closure_unittest.cc',
483 'base64_unittest.cc',
487 'build_time_unittest.cc',
488 'callback_helpers_unittest.cc',
489 'callback_list_unittest.cc',
490 'callback_list_unittest.nc',
491 'callback_unittest.cc',
492 'callback_unittest.nc',
493 'cancelable_callback_unittest.cc',
494 'command_line_unittest.cc',
495 'containers/hash_tables_unittest.cc',
496 'containers/linked_list_unittest.cc',
497 'containers/mru_cache_unittest.cc',
498 'containers/small_map_unittest.cc',
499 'containers/stack_container_unittest.cc',
501 'debug/crash_logging_unittest.cc',
502 'debug/leak_tracker_unittest.cc',
503 'debug/proc_maps_linux_unittest.cc',
504 'debug/stack_trace_unittest.cc',
505 'debug/trace_event_memory_unittest.cc',
506 'debug/trace_event_system_stats_monitor_unittest.cc',
507 'debug/trace_event_unittest.cc',
508 'debug/trace_event_unittest.h',
509 'debug/trace_event_win_unittest.cc',
510 'deferred_sequenced_task_runner_unittest.cc',
511 'environment_unittest.cc',
512 'file_util_unittest.cc',
513 'file_version_info_unittest.cc',
514 'files/dir_reader_posix_unittest.cc',
515 'files/file_path_unittest.cc',
516 'files/file_unittest.cc',
517 'files/file_util_proxy_unittest.cc',
518 'files/important_file_writer_unittest.cc',
519 'files/scoped_temp_dir_unittest.cc',
522 'id_map_unittest.cc',
523 'i18n/break_iterator_unittest.cc',
524 'i18n/char_iterator_unittest.cc',
525 'i18n/case_conversion_unittest.cc',
526 'i18n/file_util_icu_unittest.cc',
527 'i18n/icu_string_conversions_unittest.cc',
528 'i18n/number_formatting_unittest.cc',
529 'i18n/rtl_unittest.cc',
530 'i18n/string_search_unittest.cc',
531 'i18n/time_formatting_unittest.cc',
532 'i18n/timezone_unittest.cc',
533 'ini_parser_unittest.cc',
534 'ios/device_util_unittest.mm',
535 'json/json_parser_unittest.cc',
536 'json/json_reader_unittest.cc',
537 'json/json_value_converter_unittest.cc',
538 'json/json_value_serializer_unittest.cc',
539 'json/json_writer_unittest.cc',
540 'json/string_escape_unittest.cc',
541 'lazy_instance_unittest.cc',
542 'logging_unittest.cc',
543 'mac/bind_objc_block_unittest.mm',
544 'mac/foundation_util_unittest.mm',
545 'mac/libdispatch_task_runner_unittest.cc',
546 'mac/mac_util_unittest.mm',
547 'mac/objc_property_releaser_unittest.mm',
548 'mac/scoped_nsobject_unittest.mm',
549 'mac/scoped_sending_event_unittest.mm',
551 'memory/aligned_memory_unittest.cc',
552 'memory/discardable_memory_allocator_android_unittest.cc',
553 'memory/discardable_memory_unittest.cc',
554 'memory/discardable_memory_provider_unittest.cc',
555 'memory/linked_ptr_unittest.cc',
556 'memory/ref_counted_memory_unittest.cc',
557 'memory/ref_counted_unittest.cc',
558 'memory/scoped_ptr_unittest.cc',
559 'memory/scoped_ptr_unittest.nc',
560 'memory/scoped_vector_unittest.cc',
561 'memory/shared_memory_unittest.cc',
562 'memory/singleton_unittest.cc',
563 'memory/weak_ptr_unittest.cc',
564 'memory/weak_ptr_unittest.nc',
565 'message_loop/message_loop_proxy_impl_unittest.cc',
566 'message_loop/message_loop_proxy_unittest.cc',
567 'message_loop/message_loop_unittest.cc',
568 'message_loop/message_pump_glib_unittest.cc',
569 'message_loop/message_pump_io_ios_unittest.cc',
570 'message_loop/message_pump_libevent_unittest.cc',
571 'metrics/sample_map_unittest.cc',
572 'metrics/sample_vector_unittest.cc',
573 'metrics/bucket_ranges_unittest.cc',
574 'metrics/field_trial_unittest.cc',
575 'metrics/histogram_base_unittest.cc',
576 'metrics/histogram_delta_serialization_unittest.cc',
577 'metrics/histogram_unittest.cc',
578 'metrics/sparse_histogram_unittest.cc',
579 'metrics/stats_table_unittest.cc',
580 'metrics/statistics_recorder_unittest.cc',
581 'observer_list_unittest.cc',
582 'os_compat_android_unittest.cc',
583 'path_service_unittest.cc',
584 'pickle_unittest.cc',
585 'platform_file_unittest.cc',
586 'posix/file_descriptor_shuffle_unittest.cc',
587 'posix/unix_domain_socket_linux_unittest.cc',
588 'power_monitor/power_monitor_unittest.cc',
589 'prefs/default_pref_store_unittest.cc',
590 'prefs/json_pref_store_unittest.cc',
591 'prefs/mock_pref_change_callback.h',
592 'prefs/overlay_user_pref_store_unittest.cc',
593 'prefs/pref_change_registrar_unittest.cc',
594 'prefs/pref_member_unittest.cc',
595 'prefs/pref_notifier_impl_unittest.cc',
596 'prefs/pref_service_unittest.cc',
597 'prefs/pref_value_map_unittest.cc',
598 'prefs/pref_value_store_unittest.cc',
599 'prefs/scoped_user_pref_update_unittest.cc',
600 'process/memory_unittest.cc',
601 'process/memory_unittest_mac.h',
602 'process/memory_unittest_mac.mm',
603 'process/process_metrics_unittest.cc',
604 'process/process_metrics_unittest_ios.cc',
605 'process/process_util_unittest.cc',
606 'profiler/tracked_time_unittest.cc',
607 'rand_util_unittest.cc',
608 'safe_numerics_unittest.cc',
609 'safe_numerics_unittest.nc',
610 'scoped_clear_errno_unittest.cc',
611 'scoped_native_library_unittest.cc',
613 'security_unittest.cc',
614 'sequence_checker_unittest.cc',
616 'stl_util_unittest.cc',
617 'strings/nullable_string16_unittest.cc',
618 'strings/safe_sprintf_unittest.cc',
619 'strings/string16_unittest.cc',
620 'strings/stringprintf_unittest.cc',
621 'strings/string_number_conversions_unittest.cc',
622 'strings/string_piece_unittest.cc',
623 'strings/string_split_unittest.cc',
624 'strings/string_tokenizer_unittest.cc',
625 'strings/string_util_unittest.cc',
626 'strings/stringize_macros_unittest.cc',
627 'strings/sys_string_conversions_mac_unittest.mm',
628 'strings/sys_string_conversions_unittest.cc',
629 'strings/utf_offset_string_conversions_unittest.cc',
630 'strings/utf_string_conversions_unittest.cc',
631 'sync_socket_unittest.cc',
632 'synchronization/cancellation_flag_unittest.cc',
633 'synchronization/condition_variable_unittest.cc',
634 'synchronization/lock_unittest.cc',
635 'synchronization/waitable_event_unittest.cc',
636 'synchronization/waitable_event_watcher_unittest.cc',
637 'sys_info_unittest.cc',
638 'system_monitor/system_monitor_unittest.cc',
639 'task_runner_util_unittest.cc',
640 'template_util_unittest.cc',
641 'test/expectations/expectation_unittest.cc',
642 'test/expectations/parser_unittest.cc',
643 'test/test_reg_util_win_unittest.cc',
644 'test/trace_event_analyzer_unittest.cc',
645 'threading/non_thread_safe_unittest.cc',
646 'threading/platform_thread_unittest.cc',
647 'threading/sequenced_worker_pool_unittest.cc',
648 'threading/simple_thread_unittest.cc',
649 'threading/thread_checker_unittest.cc',
650 'threading/thread_collision_warner_unittest.cc',
651 'threading/thread_id_name_manager_unittest.cc',
652 'threading/thread_local_storage_unittest.cc',
653 'threading/thread_local_unittest.cc',
654 'threading/thread_unittest.cc',
655 'threading/watchdog_unittest.cc',
656 'threading/worker_pool_posix_unittest.cc',
657 'threading/worker_pool_unittest.cc',
658 'time/pr_time_unittest.cc',
659 'time/time_unittest.cc',
660 'time/time_win_unittest.cc',
661 'timer/hi_res_timer_manager_unittest.cc',
662 'timer/timer_unittest.cc',
663 'tools_sanity_unittest.cc',
664 'tracked_objects_unittest.cc',
666 'values_unittest.cc',
667 'version_unittest.cc',
670 'win/enum_variant_unittest.cc',
671 'win/event_trace_consumer_unittest.cc',
672 'win/event_trace_controller_unittest.cc',
673 'win/event_trace_provider_unittest.cc',
674 'win/i18n_unittest.cc',
675 'win/iunknown_impl_unittest.cc',
676 'win/message_window_unittest.cc',
677 'win/object_watcher_unittest.cc',
678 'win/pe_image_unittest.cc',
679 'win/registry_unittest.cc',
680 'win/scoped_bstr_unittest.cc',
681 'win/scoped_comptr_unittest.cc',
682 'win/scoped_process_information_unittest.cc',
683 'win/scoped_variant_unittest.cc',
684 'win/shortcut_unittest.cc',
685 'win/startup_information_unittest.cc',
686 'win/win_util_unittest.cc',
687 'win/wrapped_window_proc_unittest.cc',
692 'base_message_loop_tests',
694 'base_prefs_test_support',
698 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
699 '../testing/gmock.gyp:gmock',
700 '../testing/gtest.gyp:gtest',
701 '../third_party/icu/icu.gyp:icui18n',
702 '../third_party/icu/icu.gyp:icuuc',
704 'includes': ['../build/nocompile.gypi'],
706 # TODO(ajwong): Is there a way to autodetect this?
710 ['desktop_linux == 1 or chromeos == 1', {
715 ['OS == "android"', {
717 'android/jni_generator/jni_generator.gyp:jni_generator_tests',
720 ['gtest_target_type == "shared_library"', {
722 '../testing/android/native_test.gyp:native_test_native_code',
727 ['OS == "ios" and _toolset != "host"', {
729 # Only test the iOS-meaningful portion of process_utils.
730 ['exclude', '^process/memory_unittest'],
731 ['exclude', '^process/process_util_unittest\\.cc$'],
732 ['include', '^process/process_util_unittest_ios\\.cc$'],
733 # Requires spawning processes.
734 ['exclude', '^metrics/stats_table_unittest\\.cc$'],
735 # iOS does not use message_pump_libevent.
736 ['exclude', '^message_loop/message_pump_libevent_unittest\\.cc$'],
740 'action_name': 'copy_test_data',
745 'test_data_prefix': 'base',
747 'includes': [ '../build/copy_test_data_ios.gypi' ],
751 ['desktop_linux == 1 or chromeos == 1', {
753 'file_version_info_unittest.cc',
756 [ 'toolkit_uses_gtk==1', {
758 'nix/xdg_util_unittest.cc',
761 '../build/linux/system.gyp:gtk',
766 '../build/linux/system.gyp:ssl',
771 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
776 '../build/linux/system.gyp:glib',
780 'message_loop/message_pump_glib_unittest.cc',
785 'message_loop/message_pump_glib_unittest.cc',
788 ['OS == "linux" and linux_use_tcmalloc==1', {
790 'allocator/allocator.gyp:allocator',
795 # This is needed to trigger the dll copy step on windows.
796 # TODO(mark): This should not be necessary.
798 '../third_party/icu/icu.gyp:icudata',
801 'file_descriptor_shuffle_unittest.cc',
802 'files/dir_reader_posix_unittest.cc',
803 'threading/worker_pool_posix_unittest.cc',
804 'message_loop/message_pump_libevent_unittest.cc',
806 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
807 'msvs_disabled_warnings': [
810 # This is needed so base_unittests uses the allocator shim, as
811 # SecurityTest.MemoryAllocationRestriction* tests are dependent
813 # TODO(wfh): crbug.com/246278 Move tcmalloc specific tests into
814 # their own test suite.
816 ['win_use_allocator_shim==1', {
818 'allocator/allocator.gyp:allocator',
824 '../third_party/libevent/libevent.gyp:libevent'
827 ['exclude', '^win/'],
830 'win/win_util_unittest.cc',
833 ['use_aura==1 and use_x11==1', {
835 'x11/edid_parser_x11_unittest.cc',
838 ['use_system_nspr==1', {
840 'third_party/nspr/nspr.gyp:nspr',
844 'target_conditions': [
845 ['OS == "ios" and _toolset != "host"', {
847 # Pull in specific Mac files for iOS (which have been filtered out
848 # by file name rules).
849 ['include', '^mac/objc_property_releaser_unittest\\.mm$'],
850 ['include', '^mac/bind_objc_block_unittest\\.mm$'],
851 ['include', '^mac/scoped_nsobject_unittest\\.mm$'],
852 ['include', '^sys_string_conversions_mac_unittest\\.mm$'],
855 ['OS == "android"', {
857 ['include', '^debug/proc_maps_linux_unittest\\.cc$'],
860 ], # target_conditions
863 'target_name': 'test_support_base',
864 'type': 'static_library',
869 '../testing/gmock.gyp:gmock',
870 '../testing/gtest.gyp:gtest',
871 '../third_party/libxml/libxml.gyp:libxml',
872 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
874 'export_dependent_settings': [
878 ['toolkit_uses_gtk==1', {
880 # test_suite initializes GTK.
881 '../build/linux/system.gyp:gtk',
886 'test/scoped_locale.cc',
887 'test/scoped_locale.h',
892 'test/test_file_util_linux.cc',
895 ['OS == "android"', {
897 'base_unittests_jni_headers',
898 'base_java_unittest_support',
903 'test/expectations/expectation.cc',
904 'test/expectations/expectation.h',
905 'test/expectations/parser.cc',
906 'test/expectations/parser.h',
907 'test/gtest_xml_util.cc',
908 'test/gtest_xml_util.h',
909 'test/launcher/test_launcher.cc',
910 'test/launcher/test_launcher.h',
911 'test/launcher/test_result.cc',
912 'test/launcher/test_result.h',
913 'test/launcher/test_results_tracker.cc',
914 'test/launcher/test_results_tracker.h',
915 'test/launcher/unit_test_launcher.cc',
916 'test/launcher/unit_test_launcher.h',
917 'test/launcher/unit_test_launcher_ios.cc',
918 'test/mock_chrome_application_mac.h',
919 'test/mock_chrome_application_mac.mm',
920 'test/mock_devices_changed_observer.cc',
921 'test/mock_devices_changed_observer.h',
922 'test/mock_time_provider.cc',
923 'test/mock_time_provider.h',
924 'test/multiprocess_test.cc',
925 'test/multiprocess_test.h',
926 'test/multiprocess_test_android.cc',
927 'test/null_task_runner.cc',
928 'test/null_task_runner.h',
931 'test/perf_test_suite.cc',
932 'test/perf_test_suite.h',
933 'test/perf_time_logger.cc',
934 'test/perf_time_logger.h',
935 'test/power_monitor_test_base.cc',
936 'test/power_monitor_test_base.h',
937 'test/scoped_locale.cc',
938 'test/scoped_locale.h',
939 'test/scoped_path_override.cc',
940 'test/scoped_path_override.h',
941 'test/sequenced_task_runner_test_template.cc',
942 'test/sequenced_task_runner_test_template.h',
943 'test/sequenced_worker_pool_owner.cc',
944 'test/sequenced_worker_pool_owner.h',
945 'test/simple_test_clock.cc',
946 'test/simple_test_clock.h',
947 'test/simple_test_tick_clock.cc',
948 'test/simple_test_tick_clock.h',
949 'test/task_runner_test_template.cc',
950 'test/task_runner_test_template.h',
951 'test/test_file_util.cc',
952 'test/test_file_util.h',
953 'test/test_file_util_android.cc',
954 'test/test_file_util_linux.cc',
955 'test/test_file_util_mac.cc',
956 'test/test_file_util_posix.cc',
957 'test/test_file_util_win.cc',
958 'test/test_listener_ios.h',
959 'test/test_listener_ios.mm',
960 'test/test_pending_task.cc',
961 'test/test_pending_task.h',
962 'test/test_process_killer_win.cc',
963 'test/test_process_killer_win.h',
964 'test/test_reg_util_win.cc',
965 'test/test_reg_util_win.h',
966 'test/test_shortcut_win.cc',
967 'test/test_shortcut_win.h',
968 'test/test_simple_task_runner.cc',
969 'test/test_simple_task_runner.h',
970 'test/test_suite.cc',
972 'test/test_support_android.cc',
973 'test/test_support_android.h',
974 'test/test_support_ios.h',
975 'test/test_support_ios.mm',
976 'test/test_switches.cc',
977 'test/test_switches.h',
978 'test/test_timeouts.cc',
979 'test/test_timeouts.h',
980 'test/thread_test_helper.cc',
981 'test/thread_test_helper.h',
982 'test/trace_event_analyzer.cc',
983 'test/trace_event_analyzer.h',
984 'test/values_test_util.cc',
985 'test/values_test_util.h',
987 'target_conditions': [
990 # Pull in specific Mac files for iOS (which have been filtered out
991 # by file name rules).
992 ['include', '^test/test_file_util_mac\\.cc$'],
995 # iOS uses its own unit test launcher.
996 'test/launcher/unit_test_launcher.cc',
999 ], # target_conditions
1002 'target_name': 'test_support_perf',
1003 'type': 'static_library',
1006 'test_support_base',
1007 '../testing/gtest.gyp:gtest',
1010 'test/run_all_perftests.cc',
1012 'direct_dependent_settings': {
1018 ['toolkit_uses_gtk==1', {
1020 # Needed to handle the #include chain:
1021 # base/test/perf_test_suite.h
1022 # base/test/test_suite.h
1024 '../build/linux/system.gyp:gtk',
1034 'target_name': 'check_example',
1035 'type': 'executable',
1045 ['OS == "win" and target_arch=="ia32"', {
1048 'target_name': 'base_nacl_win64',
1049 'type': '<(component)',
1054 'base_static_win64',
1055 'allocator/allocator.gyp:allocator_extension_thunks_win64',
1056 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
1058 # TODO(gregoryd): direct_dependent_settings should be shared with the
1059 # 32-bit target, but it doesn't work due to a bug in gyp
1060 'direct_dependent_settings': {
1066 '<@(nacl_win64_defines)',
1069 # base64.cc depends on modp_b64.
1074 'msvs_target_platform': 'x64',
1078 ['component == "shared_library"', {
1080 'debug/debug_on_start_win.cc',
1086 'target_name': 'base_i18n_nacl_win64',
1087 'type': '<(component)',
1088 # TODO(gregoryd): direct_dependent_settings should be shared with the
1089 # 32-bit target, but it doesn't work due to a bug in gyp
1090 'direct_dependent_settings': {
1096 '<@(nacl_win64_defines)',
1097 'BASE_I18N_IMPLEMENTATION',
1103 'i18n/icu_util_nacl_win64.cc',
1107 'msvs_target_platform': 'x64',
1112 # TODO(rvargas): Remove this when gyp finally supports a clean model.
1114 'target_name': 'base_static_win64',
1115 'type': 'static_library',
1123 # base64.cc depends on modp_b64.
1131 'msvs_target_platform': 'x64',
1137 # TODO(rvargas): Bug 78117. Remove this.
1138 'msvs_disabled_warnings': [
1144 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1147 'target_name': 'symbolize',
1148 'type': 'static_library',
1149 'toolsets': ['host', 'target'],
1154 ['OS == "solaris"', {
1157 '/usr/gnu/include/libelf',
1162 '-Wno-sign-compare',
1168 'third_party/symbolize/config.h',
1169 'third_party/symbolize/demangle.cc',
1170 'third_party/symbolize/demangle.h',
1171 'third_party/symbolize/glog/logging.h',
1172 'third_party/symbolize/glog/raw_logging.h',
1173 'third_party/symbolize/symbolize.cc',
1174 'third_party/symbolize/symbolize.h',
1175 'third_party/symbolize/utilities.h',
1182 'target_name': 'xdg_mime',
1183 'type': 'static_library',
1184 'toolsets': ['host', 'target'],
1192 'third_party/xdg_mime/xdgmime.c',
1193 'third_party/xdg_mime/xdgmime.h',
1194 'third_party/xdg_mime/xdgmimealias.c',
1195 'third_party/xdg_mime/xdgmimealias.h',
1196 'third_party/xdg_mime/xdgmimecache.c',
1197 'third_party/xdg_mime/xdgmimecache.h',
1198 'third_party/xdg_mime/xdgmimeglob.c',
1199 'third_party/xdg_mime/xdgmimeglob.h',
1200 'third_party/xdg_mime/xdgmimeicon.c',
1201 'third_party/xdg_mime/xdgmimeicon.h',
1202 'third_party/xdg_mime/xdgmimeint.c',
1203 'third_party/xdg_mime/xdgmimeint.h',
1204 'third_party/xdg_mime/xdgmimemagic.c',
1205 'third_party/xdg_mime/xdgmimemagic.h',
1206 'third_party/xdg_mime/xdgmimeparent.c',
1207 'third_party/xdg_mime/xdgmimeparent.h',
1212 ['OS == "android"', {
1215 'target_name': 'base_jni_headers',
1218 'android/java/src/org/chromium/base/ActivityStatus.java',
1219 'android/java/src/org/chromium/base/BuildInfo.java',
1220 'android/java/src/org/chromium/base/CommandLine.java',
1221 'android/java/src/org/chromium/base/ContentUriUtils.java',
1222 'android/java/src/org/chromium/base/CpuFeatures.java',
1223 'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java',
1224 'android/java/src/org/chromium/base/MemoryPressureListener.java',
1225 'android/java/src/org/chromium/base/JavaHandlerThread.java',
1226 'android/java/src/org/chromium/base/PathService.java',
1227 'android/java/src/org/chromium/base/PathUtils.java',
1228 'android/java/src/org/chromium/base/PowerMonitor.java',
1229 'android/java/src/org/chromium/base/SystemMessageHandler.java',
1230 'android/java/src/org/chromium/base/SysUtils.java',
1231 'android/java/src/org/chromium/base/ThreadUtils.java',
1236 'android/java/src/org/chromium/base/ContextTypes.java',
1241 'jni_gen_package': 'base',
1242 'jni_generator_ptr_type': 'long',
1244 'includes': [ '../build/jni_generator.gypi' ],
1247 'target_name': 'base_unittests_jni_headers',
1250 'test/android/java/src/org/chromium/base/ContentUriTestUtils.java',
1253 'jni_gen_package': 'base',
1255 'includes': [ '../build/jni_generator.gypi' ],
1258 'target_name': 'base_java',
1261 'java_in_dir': '../base/android/java',
1264 'base_java_activity_state',
1265 'base_java_memory_pressure_level_list',
1267 'includes': [ '../build/java.gypi' ],
1269 ['android_webview_build==0', {
1271 '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
1277 'target_name': 'base_java_unittest_support',
1283 'java_in_dir': '../base/test/android/java',
1285 'includes': [ '../build/java.gypi' ],
1288 'target_name': 'base_java_activity_state',
1290 # This target is used to auto-generate ActivityState.java
1291 # from a template file. The source file contains a list of
1292 # Java constant declarations matching the ones in
1293 # android/activity_state_list.h.
1295 'android/java/src/org/chromium/base/ActivityState.template',
1298 'package_name': 'org/chromium/base',
1299 'template_deps': ['android/activity_state_list.h'],
1301 'includes': [ '../build/android/java_cpp_template.gypi' ],
1304 'target_name': 'base_java_memory_pressure_level_list',
1307 'android/java/src/org/chromium/base/MemoryPressureLevelList.template',
1310 'package_name': 'org/chromium/base',
1311 'template_deps': ['memory/memory_pressure_level_list.h'],
1313 'includes': [ '../build/android/java_cpp_template.gypi' ],
1316 'target_name': 'base_java_test_support',
1322 'java_in_dir': '../base/test/android/javatests',
1324 'includes': [ '../build/java.gypi' ],
1327 'target_name': 'base_javatests',
1331 'base_java_test_support',
1334 'java_in_dir': '../base/android/javatests',
1336 'includes': [ '../build/java.gypi' ],
1343 'target_name': 'debug_message',
1344 'type': 'executable',
1350 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
1356 # Special target to wrap a gtest_target_type == shared_library
1357 # base_unittests into an android apk for execution.
1358 # TODO(jrg): lib.target comes from _InstallableTargetInstallPath()
1359 # in the gyp make generator. What is the correct way to extract
1360 # this path from gyp and into 'raw' for input to antfiles?
1361 # Hard-coding in the gypfile seems a poor choice.
1362 ['OS == "android" and gtest_target_type == "shared_library"', {
1365 'target_name': 'base_unittests_apk',
1372 'test_suite_name': 'base_unittests',
1373 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)base_unittests<(SHARED_LIB_SUFFIX)',
1375 'includes': [ '../build/apk_test.gypi' ],
1379 ['test_isolation_mode != "noop"', {
1382 'target_name': 'base_unittests_run',
1388 '../build/isolate.gypi',
1389 'base_unittests.isolate',
1392 'base_unittests.isolate',