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$'] ]
51 }, { # desktop_linux == 0 and chromeos == 0
53 ['exclude', '/xdg_user_dirs/'],
54 ['exclude', '_nss\\.cc$'],
59 '../build/linux/system.gyp:glib',
61 'export_dependent_settings': [
62 '../build/linux/system.gyp:glib',
65 ['OS == "android" and _toolset == "host"', {
66 # Always build base as a static_library for host toolset, even if
67 # we're doing a component build. Specifically, we only care about the
68 # target toolset using components since that's what developers are
69 # focusing on. In theory we should do this more generally for all
70 # targets when building for host, but getting the gyp magic
71 # per-toolset for the "component" variable is hard, and we really only
73 'type': 'static_library',
74 # Base for host support is the minimum required to run the
75 # ssl false start blacklist tool. It requires further changes
76 # to generically support host builds (and tests).
77 # Note: when building for host, gyp has OS == "android",
78 # hence the *_android.cc files are included but the actual code
79 # doesn't have OS_ANDROID / ANDROID defined.
81 ['host_os == "mac"', {
83 ['exclude', '^native_library_linux\\.cc$'],
84 ['exclude', '^process_util_linux\\.cc$'],
85 ['exclude', '^sys_info_linux\\.cc$'],
86 ['exclude', '^sys_string_conversions_linux\\.cc$'],
87 ['exclude', '^worker_pool_linux\\.cc$'],
92 ['OS == "android" and _toolset == "target"', {
94 ['target_arch == "ia32" or target_arch == "x64"', {
96 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
99 ['target_arch == "mipsel"', {
101 ['include', '^atomicops_internals_mips_gcc\\.cc$'],
108 '../third_party/ashmem/ashmem.gyp:ashmem',
116 'debug/stack_trace_posix.cc',
119 '../build/android/cpufeatures.gypi',
124 '/usr/local/include',
128 '-L/usr/local/lib -lexecinfo',
135 # We need rt for clock_gettime().
137 # For 'native_library_linux.cc'
142 ['use_allocator!="tcmalloc"', {
146 'direct_dependent_settings': {
155 # Specify delayload for base.dll.
163 'AdditionalDependencies': [
170 # Specify delayload for components that link with base.lib.
171 'all_dependent_settings': {
179 'AdditionalDependencies': [
189 'destination': '<(PRODUCT_DIR)/',
191 '../build/win/dbghelp_xp/dbghelp.dll',
196 ['OS == "mac" or (OS == "ios" and _toolset == "host")', {
199 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
200 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
201 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
202 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
203 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
204 '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
205 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
209 ['OS == "ios" and _toolset != "host"', {
212 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
213 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
214 '$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
215 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
216 '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
220 ['OS != "win" and (OS != "ios" or _toolset == "host")', {
221 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
223 ['component=="shared_library"', {
227 'debug/debug_on_start_win.cc',
234 'async_socket_io_handler.h',
235 'async_socket_io_handler_posix.cc',
236 'async_socket_io_handler_win.cc',
240 'message_loop/message_pump_android.cc',
241 'message_loop/message_pump_android.h',
242 'message_loop/message_pump_glib.cc',
243 'message_loop/message_pump_glib.h',
244 'message_loop/message_pump_io_ios.cc',
245 'message_loop/message_pump_io_ios.h',
246 'message_loop/message_pump_libevent.cc',
247 'message_loop/message_pump_libevent.h',
248 'message_loop/message_pump_mac.h',
249 'message_loop/message_pump_mac.mm',
250 'metrics/field_trial.cc',
251 'metrics/field_trial.h',
252 'posix/file_descriptor_shuffle.cc',
253 'posix/file_descriptor_shuffle.h',
255 'sync_socket_posix.cc',
256 'sync_socket_win.cc',
257 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
258 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
261 '../build/android/increase_size_for_speed.gypi',
265 'target_name': 'base_i18n',
266 'type': '<(component)',
268 'enable_wexit_time_destructors': 1,
270 'base_i18n_target': 1,
274 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
275 '../third_party/icu/icu.gyp:icui18n',
276 '../third_party/icu/icu.gyp:icuuc',
280 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
281 'msvs_disabled_warnings': [
285 ['icu_use_data_file_flag==1', {
286 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
287 }, { # else icu_use_data_file_flag !=1
290 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
292 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
297 'toolsets': ['host', 'target'],
300 'export_dependent_settings': [
304 '../build/android/increase_size_for_speed.gypi',
308 'target_name': 'base_message_loop_tests',
309 'type': 'static_library',
312 '../testing/gtest.gyp:gtest',
315 'message_loop/message_loop_test.cc',
316 'message_loop/message_loop_test.h',
320 'target_name': 'base_prefs',
321 'type': '<(component)',
323 'enable_wexit_time_destructors': 1,
329 'export_dependent_settings': [
333 'BASE_PREFS_IMPLEMENTATION',
336 'prefs/base_prefs_export.h',
337 'prefs/default_pref_store.cc',
338 'prefs/default_pref_store.h',
339 'prefs/json_pref_store.cc',
340 'prefs/json_pref_store.h',
341 'prefs/overlay_user_pref_store.cc',
342 'prefs/overlay_user_pref_store.h',
343 'prefs/persistent_pref_store.h',
344 'prefs/pref_change_registrar.cc',
345 'prefs/pref_change_registrar.h',
346 'prefs/pref_filter.h',
347 'prefs/pref_member.cc',
348 'prefs/pref_member.h',
349 'prefs/pref_notifier.h',
350 'prefs/pref_notifier_impl.cc',
351 'prefs/pref_notifier_impl.h',
352 'prefs/pref_observer.h',
353 'prefs/pref_registry.cc',
354 'prefs/pref_registry.h',
355 'prefs/pref_registry_simple.cc',
356 'prefs/pref_registry_simple.h',
357 'prefs/pref_service.cc',
358 'prefs/pref_service.h',
359 'prefs/pref_service_factory.cc',
360 'prefs/pref_service_factory.h',
361 'prefs/pref_store.cc',
362 'prefs/pref_store.h',
363 'prefs/pref_value_map.cc',
364 'prefs/pref_value_map.h',
365 'prefs/pref_value_store.cc',
366 'prefs/pref_value_store.h',
367 'prefs/scoped_user_pref_update.cc',
368 'prefs/scoped_user_pref_update.h',
369 'prefs/value_map_pref_store.cc',
370 'prefs/value_map_pref_store.h',
371 'prefs/writeable_pref_store.h',
374 '../build/android/increase_size_for_speed.gypi',
378 # TODO(pasko): Remove this target when crbug.com/424562 is fixed.
379 # GN: //base:protect_file_posix
380 'target_name': 'protect_file_posix',
383 'type': 'static_library',
388 'files/protect_file_posix.cc',
396 'target_name': 'base_prefs_test_support',
397 'type': 'static_library',
401 '../testing/gmock.gyp:gmock',
404 'prefs/mock_pref_change_callback.cc',
405 'prefs/pref_store_observer_mock.cc',
406 'prefs/pref_store_observer_mock.h',
407 'prefs/testing_pref_service.cc',
408 'prefs/testing_pref_service.h',
409 'prefs/testing_pref_store.cc',
410 'prefs/testing_pref_store.h',
414 # This is the subset of files from base that should not be used with a
415 # dynamic library. Note that this library cannot depend on base because
416 # base depends on base_static.
417 'target_name': 'base_static',
418 'type': 'static_library',
420 'enable_wexit_time_destructors': 1,
423 'toolsets': ['host', 'target'],
434 '../build/android/increase_size_for_speed.gypi',
437 # Include this target for a main() function that simply instantiates
438 # and runs a base::TestSuite.
440 'target_name': 'run_all_unittests',
441 'type': 'static_library',
446 'test/run_all_unittests.cc',
450 'target_name': 'malloc_wrapper',
451 'type': 'shared_library',
456 'test/malloc_wrapper.cc',
460 'target_name': 'base_unittests',
461 'type': '<(gtest_target_type)',
463 'android/application_status_listener_unittest.cc',
464 'android/content_uri_utils_unittest.cc',
465 'android/jni_android_unittest.cc',
466 'android/jni_array_unittest.cc',
467 'android/jni_string_unittest.cc',
468 'android/path_utils_unittest.cc',
469 'android/scoped_java_ref_unittest.cc',
470 'android/sys_utils_unittest.cc',
471 'async_socket_io_handler_unittest.cc',
472 'at_exit_unittest.cc',
473 'atomicops_unittest.cc',
474 'barrier_closure_unittest.cc',
475 'base64_unittest.cc',
476 'big_endian_unittest.cc',
480 'build_time_unittest.cc',
481 'callback_helpers_unittest.cc',
482 'callback_list_unittest.cc',
483 'callback_list_unittest.nc',
484 'callback_unittest.cc',
485 'callback_unittest.nc',
486 'cancelable_callback_unittest.cc',
487 'chromeos/memory_pressure_observer_chromeos_unittest.cc',
488 'command_line_unittest.cc',
489 'containers/adapters_unittest.cc',
490 'containers/hash_tables_unittest.cc',
491 'containers/linked_list_unittest.cc',
492 'containers/mru_cache_unittest.cc',
493 'containers/small_map_unittest.cc',
494 'containers/stack_container_unittest.cc',
496 'debug/crash_logging_unittest.cc',
497 'debug/debugger_unittest.cc',
498 'debug/leak_tracker_unittest.cc',
499 'debug/proc_maps_linux_unittest.cc',
500 'debug/stack_trace_unittest.cc',
501 'debug/task_annotator_unittest.cc',
502 'deferred_sequenced_task_runner_unittest.cc',
503 'environment_unittest.cc',
504 'file_version_info_unittest.cc',
505 'files/dir_reader_posix_unittest.cc',
506 'files/file_path_unittest.cc',
507 'files/file_proxy_unittest.cc',
508 'files/file_unittest.cc',
509 'files/file_util_proxy_unittest.cc',
510 'files/file_util_unittest.cc',
511 'files/important_file_writer_unittest.cc',
512 'files/memory_mapped_file_unittest.cc',
513 'files/scoped_temp_dir_unittest.cc',
517 'i18n/break_iterator_unittest.cc',
518 'i18n/case_conversion_unittest.cc',
519 'i18n/char_iterator_unittest.cc',
520 'i18n/file_util_icu_unittest.cc',
521 'i18n/icu_string_conversions_unittest.cc',
522 'i18n/number_formatting_unittest.cc',
523 'i18n/rtl_unittest.cc',
524 'i18n/streaming_utf8_validator_unittest.cc',
525 'i18n/string_search_unittest.cc',
526 'i18n/time_formatting_unittest.cc',
527 'i18n/timezone_unittest.cc',
528 'id_map_unittest.cc',
529 'ios/crb_protocol_observers_unittest.mm',
530 'ios/device_util_unittest.mm',
531 'ios/weak_nsobject_unittest.mm',
532 'json/json_parser_unittest.cc',
533 'json/json_reader_unittest.cc',
534 'json/json_value_converter_unittest.cc',
535 'json/json_value_serializer_unittest.cc',
536 'json/json_writer_unittest.cc',
537 'json/string_escape_unittest.cc',
538 'lazy_instance_unittest.cc',
539 'logging_unittest.cc',
540 'mac/bind_objc_block_unittest.mm',
541 'mac/foundation_util_unittest.mm',
542 'mac/libdispatch_task_runner_unittest.cc',
543 'mac/mac_util_unittest.mm',
544 'mac/objc_property_releaser_unittest.mm',
545 'mac/scoped_nsobject_unittest.mm',
546 'mac/scoped_objc_class_swizzler_unittest.mm',
547 'mac/scoped_sending_event_unittest.mm',
549 'memory/aligned_memory_unittest.cc',
550 'memory/discardable_shared_memory_unittest.cc',
551 'memory/linked_ptr_unittest.cc',
552 'memory/ref_counted_memory_unittest.cc',
553 'memory/ref_counted_unittest.cc',
554 'memory/scoped_ptr_unittest.cc',
555 'memory/scoped_ptr_unittest.nc',
556 'memory/scoped_vector_unittest.cc',
557 'memory/shared_memory_unittest.cc',
558 'memory/singleton_unittest.cc',
559 'memory/weak_ptr_unittest.cc',
560 'memory/weak_ptr_unittest.nc',
561 'message_loop/message_loop_proxy_impl_unittest.cc',
562 'message_loop/message_loop_proxy_unittest.cc',
563 'message_loop/message_loop_unittest.cc',
564 'message_loop/message_pump_glib_unittest.cc',
565 'message_loop/message_pump_io_ios_unittest.cc',
566 'message_loop/message_pump_libevent_unittest.cc',
567 'metrics/bucket_ranges_unittest.cc',
568 'metrics/field_trial_unittest.cc',
569 'metrics/histogram_base_unittest.cc',
570 'metrics/histogram_delta_serialization_unittest.cc',
571 'metrics/histogram_macros_unittest.cc',
572 'metrics/histogram_snapshot_manager_unittest.cc',
573 'metrics/histogram_unittest.cc',
574 'metrics/sample_map_unittest.cc',
575 'metrics/sample_vector_unittest.cc',
576 'metrics/sparse_histogram_unittest.cc',
577 'metrics/statistics_recorder_unittest.cc',
578 'numerics/safe_numerics_unittest.cc',
579 'observer_list_unittest.cc',
580 'os_compat_android_unittest.cc',
581 'path_service_unittest.cc',
582 'pickle_unittest.cc',
583 'posix/file_descriptor_shuffle_unittest.cc',
584 'posix/unix_domain_socket_linux_unittest.cc',
585 'power_monitor/power_monitor_unittest.cc',
586 'prefs/default_pref_store_unittest.cc',
587 'prefs/json_pref_store_unittest.cc',
588 'prefs/mock_pref_change_callback.h',
589 'prefs/overlay_user_pref_store_unittest.cc',
590 'prefs/pref_change_registrar_unittest.cc',
591 'prefs/pref_member_unittest.cc',
592 'prefs/pref_notifier_impl_unittest.cc',
593 'prefs/pref_service_unittest.cc',
594 'prefs/pref_value_map_unittest.cc',
595 'prefs/pref_value_store_unittest.cc',
596 'prefs/scoped_user_pref_update_unittest.cc',
597 'process/memory_unittest.cc',
598 'process/memory_unittest_mac.h',
599 'process/memory_unittest_mac.mm',
600 'process/process_metrics_unittest.cc',
601 'process/process_metrics_unittest_ios.cc',
602 'process/process_unittest.cc',
603 'process/process_util_unittest.cc',
604 'profiler/stack_sampling_profiler_unittest.cc',
605 'profiler/tracked_time_unittest.cc',
606 'rand_util_unittest.cc',
607 'scoped_clear_errno_unittest.cc',
608 'scoped_generic_unittest.cc',
609 'scoped_native_library_unittest.cc',
610 'security_unittest.cc',
611 'sequence_checker_unittest.cc',
613 'stl_util_unittest.cc',
614 'strings/nullable_string16_unittest.cc',
615 'strings/safe_sprintf_unittest.cc',
616 'strings/string16_unittest.cc',
617 'strings/string_number_conversions_unittest.cc',
618 'strings/string_piece_unittest.cc',
619 'strings/string_split_unittest.cc',
620 'strings/string_tokenizer_unittest.cc',
621 'strings/string_util_unittest.cc',
622 'strings/stringize_macros_unittest.cc',
623 'strings/stringprintf_unittest.cc',
624 'strings/sys_string_conversions_mac_unittest.mm',
625 'strings/sys_string_conversions_unittest.cc',
626 'strings/utf_offset_string_conversions_unittest.cc',
627 'strings/utf_string_conversions_unittest.cc',
628 'supports_user_data_unittest.cc',
629 'sync_socket_unittest.cc',
630 'synchronization/cancellation_flag_unittest.cc',
631 'synchronization/condition_variable_unittest.cc',
632 'synchronization/lock_unittest.cc',
633 'synchronization/waitable_event_unittest.cc',
634 'synchronization/waitable_event_watcher_unittest.cc',
635 'sys_info_unittest.cc',
636 'system_monitor/system_monitor_unittest.cc',
637 'task/cancelable_task_tracker_unittest.cc',
638 'task_runner_util_unittest.cc',
639 'template_util_unittest.cc',
640 'test/expectations/expectation_unittest.cc',
641 'test/expectations/parser_unittest.cc',
642 'test/histogram_tester_unittest.cc',
643 'test/test_pending_task_unittest.cc',
644 'test/test_reg_util_win_unittest.cc',
645 'test/trace_event_analyzer_unittest.cc',
646 'threading/non_thread_safe_unittest.cc',
647 'threading/platform_thread_unittest.cc',
648 'threading/sequenced_worker_pool_unittest.cc',
649 'threading/simple_thread_unittest.cc',
650 'threading/thread_checker_unittest.cc',
651 'threading/thread_collision_warner_unittest.cc',
652 'threading/thread_id_name_manager_unittest.cc',
653 'threading/thread_local_storage_unittest.cc',
654 'threading/thread_local_unittest.cc',
655 'threading/thread_unittest.cc',
656 'threading/watchdog_unittest.cc',
657 'threading/worker_pool_posix_unittest.cc',
658 'threading/worker_pool_unittest.cc',
659 'time/pr_time_unittest.cc',
660 'time/time_unittest.cc',
661 'time/time_win_unittest.cc',
662 'timer/hi_res_timer_manager_unittest.cc',
663 'timer/mock_timer_unittest.cc',
664 'timer/timer_unittest.cc',
665 'tools_sanity_unittest.cc',
666 'tracked_objects_unittest.cc',
668 'values_unittest.cc',
669 'version_unittest.cc',
672 'win/enum_variant_unittest.cc',
673 'win/event_trace_consumer_unittest.cc',
674 'win/event_trace_controller_unittest.cc',
675 'win/event_trace_provider_unittest.cc',
676 'win/i18n_unittest.cc',
677 'win/iunknown_impl_unittest.cc',
678 'win/message_window_unittest.cc',
679 'win/object_watcher_unittest.cc',
680 'win/pe_image_unittest.cc',
681 'win/registry_unittest.cc',
682 'win/scoped_bstr_unittest.cc',
683 'win/scoped_comptr_unittest.cc',
684 'win/scoped_process_information_unittest.cc',
685 'win/scoped_variant_unittest.cc',
686 'win/shortcut_unittest.cc',
687 'win/startup_information_unittest.cc',
688 'win/win_util_unittest.cc',
689 'win/wrapped_window_proc_unittest.cc',
690 '<@(trace_event_test_sources)',
695 'base_message_loop_tests',
697 'base_prefs_test_support',
701 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
702 '../testing/gmock.gyp:gmock',
703 '../testing/gtest.gyp:gtest',
704 '../third_party/icu/icu.gyp:icui18n',
705 '../third_party/icu/icu.gyp:icuuc',
707 'includes': ['../build/nocompile.gypi'],
709 # TODO(ajwong): Is there a way to autodetect this?
713 ['OS == "android"', {
715 'android/jni_generator/jni_generator.gyp:jni_generator_tests',
716 '../testing/android/native_test.gyp:native_test_native_code',
719 ['OS == "ios" and _toolset != "host"', {
721 # Only test the iOS-meaningful portion of process_utils.
722 ['exclude', '^process/memory_unittest'],
723 ['exclude', '^process/process_unittest\\.cc$'],
724 ['exclude', '^process/process_util_unittest\\.cc$'],
725 ['include', '^process/process_util_unittest_ios\\.cc$'],
726 # iOS does not use message_pump_libevent.
727 ['exclude', '^message_loop/message_pump_libevent_unittest\\.cc$'],
731 'action_name': 'copy_test_data',
736 'test_data_prefix': 'base',
738 'includes': [ '../build/copy_test_data_ios.gypi' ],
742 ['desktop_linux == 1 or chromeos == 1', {
747 'file_version_info_unittest.cc',
750 [ 'desktop_linux==1', {
752 'nix/xdg_util_unittest.cc',
759 '../build/linux/system.gyp:glib',
763 'message_loop/message_pump_glib_unittest.cc',
768 'message_loop/message_pump_glib_unittest.cc',
776 ['use_allocator!="none"', {
778 'allocator/allocator.gyp:allocator',
785 'file_descriptor_shuffle_unittest.cc',
786 'files/dir_reader_posix_unittest.cc',
787 'message_loop/message_pump_libevent_unittest.cc',
788 'threading/worker_pool_posix_unittest.cc',
790 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
791 'msvs_disabled_warnings': [
795 # This is needed so base_unittests uses the allocator shim, as
796 # SecurityTest.MemoryAllocationRestriction* tests are dependent
798 # TODO(wfh): crbug.com/246278 Move tcmalloc specific tests into
799 # their own test suite.
800 ['win_use_allocator_shim==1', {
802 'allocator/allocator.gyp:allocator',
805 ['icu_use_data_file_flag==0', {
806 # This is needed to trigger the dll copy step on windows.
807 # TODO(mark): This should not be necessary.
809 '../third_party/icu/icu.gyp:icudata',
812 ['incremental_chrome_dll', {
814 # Used only to workaround a linker bug, do not use this
815 # otherwise, and don't make it broader scope. See
816 # http://crbug.com/251251.
817 'INCREMENTAL_LINKING',
823 '../third_party/libevent/libevent.gyp:libevent'
827 'target_conditions': [
828 ['OS == "ios" and _toolset != "host"', {
830 # Pull in specific Mac files for iOS (which have been filtered out
831 # by file name rules).
832 ['include', '^mac/bind_objc_block_unittest\\.mm$'],
833 ['include', '^mac/foundation_util_unittest\\.mm$',],
834 ['include', '^mac/objc_property_releaser_unittest\\.mm$'],
835 ['include', '^mac/scoped_nsobject_unittest\\.mm$'],
836 ['include', '^sys_string_conversions_mac_unittest\\.mm$'],
839 ['OS == "android"', {
841 ['include', '^debug/proc_maps_linux_unittest\\.cc$'],
844 # Enable more direct string conversions on platforms with native utf8
846 ['OS=="mac" or OS=="ios" or <(chromeos)==1 or <(chromecast)==1', {
847 'defines': ['SYSTEM_NATIVE_UTF8'],
849 ], # target_conditions
852 # GN: //base:base_perftests
853 'target_name': 'base_perftests',
854 'type': '<(gtest_target_type)',
858 '../testing/gtest.gyp:gtest',
861 'message_loop/message_pump_perftest.cc',
862 'test/run_all_unittests.cc',
863 'threading/thread_perftest.cc',
864 '../testing/perf/perf_test.cc'
867 ['OS == "android"', {
869 '../testing/android/native_test.gyp:native_test_native_code',
875 # GN: //base:base_i18n_perftests
876 'target_name': 'base_i18n_perftests',
877 'type': '<(gtest_target_type)',
881 '../testing/gtest.gyp:gtest',
886 'i18n/streaming_utf8_validator_perftest.cc',
890 # GN: //base/test:test_support
891 'target_name': 'test_support_base',
892 'type': 'static_library',
897 '../testing/gmock.gyp:gmock',
898 '../testing/gtest.gyp:gtest',
899 '../third_party/icu/icu.gyp:icuuc',
900 '../third_party/libxml/libxml.gyp:libxml',
901 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
903 'export_dependent_settings': [
909 'test/scoped_locale.cc',
910 'test/scoped_locale.h',
915 'test/test_file_util_linux.cc',
918 ['OS == "android"', {
920 'base_unittests_jni_headers',
921 'base_java_unittest_support',
925 'toolsets': ['host', 'target'],
929 'test/expectations/expectation.cc',
930 'test/expectations/expectation.h',
931 'test/expectations/parser.cc',
932 'test/expectations/parser.h',
933 'test/gtest_util.cc',
935 'test/gtest_xml_util.cc',
936 'test/gtest_xml_util.h',
937 'test/histogram_tester.cc',
938 'test/histogram_tester.h',
939 'test/ios/wait_util.h',
940 'test/ios/wait_util.mm',
941 'test/launcher/test_launcher.cc',
942 'test/launcher/test_launcher.h',
943 'test/launcher/test_result.cc',
944 'test/launcher/test_result.h',
945 'test/launcher/test_results_tracker.cc',
946 'test/launcher/test_results_tracker.h',
947 'test/launcher/unit_test_launcher.cc',
948 'test/launcher/unit_test_launcher.h',
949 'test/launcher/unit_test_launcher_ios.cc',
950 'test/mock_chrome_application_mac.h',
951 'test/mock_chrome_application_mac.mm',
952 'test/mock_devices_changed_observer.cc',
953 'test/mock_devices_changed_observer.h',
956 'test/multiprocess_test.cc',
957 'test/multiprocess_test.h',
958 'test/multiprocess_test_android.cc',
959 'test/null_task_runner.cc',
960 'test/null_task_runner.h',
961 'test/opaque_ref_counted.cc',
962 'test/opaque_ref_counted.h',
965 'test/perf_test_suite.cc',
966 'test/perf_test_suite.h',
967 'test/perf_time_logger.cc',
968 'test/perf_time_logger.h',
969 'test/power_monitor_test_base.cc',
970 'test/power_monitor_test_base.h',
971 'test/scoped_locale.cc',
972 'test/scoped_locale.h',
973 'test/scoped_path_override.cc',
974 'test/scoped_path_override.h',
975 'test/sequenced_task_runner_test_template.cc',
976 'test/sequenced_task_runner_test_template.h',
977 'test/sequenced_worker_pool_owner.cc',
978 'test/sequenced_worker_pool_owner.h',
979 'test/simple_test_clock.cc',
980 'test/simple_test_clock.h',
981 'test/simple_test_tick_clock.cc',
982 'test/simple_test_tick_clock.h',
983 'test/task_runner_test_template.cc',
984 'test/task_runner_test_template.h',
985 'test/test_discardable_memory_allocator.cc',
986 'test/test_discardable_memory_allocator.h',
987 'test/test_file_util.cc',
988 'test/test_file_util.h',
989 'test/test_file_util_android.cc',
990 'test/test_file_util_linux.cc',
991 'test/test_file_util_mac.cc',
992 'test/test_file_util_posix.cc',
993 'test/test_file_util_win.cc',
994 'test/test_io_thread.cc',
995 'test/test_io_thread.h',
996 'test/test_listener_ios.h',
997 'test/test_listener_ios.mm',
998 'test/test_mock_time_task_runner.cc',
999 'test/test_mock_time_task_runner.h',
1000 'test/test_pending_task.cc',
1001 'test/test_pending_task.h',
1002 'test/test_reg_util_win.cc',
1003 'test/test_reg_util_win.h',
1004 'test/test_shortcut_win.cc',
1005 'test/test_shortcut_win.h',
1006 'test/test_simple_task_runner.cc',
1007 'test/test_simple_task_runner.h',
1008 'test/test_suite.cc',
1009 'test/test_suite.h',
1010 'test/test_support_android.cc',
1011 'test/test_support_android.h',
1012 'test/test_support_ios.h',
1013 'test/test_support_ios.mm',
1014 'test/test_switches.cc',
1015 'test/test_switches.h',
1016 'test/test_timeouts.cc',
1017 'test/test_timeouts.h',
1018 'test/thread_test_helper.cc',
1019 'test/thread_test_helper.h',
1020 'test/trace_event_analyzer.cc',
1021 'test/trace_event_analyzer.h',
1022 'test/trace_to_file.cc',
1023 'test/trace_to_file.h',
1024 'test/values_test_util.cc',
1025 'test/values_test_util.h',
1027 'target_conditions': [
1030 # Pull in specific Mac files for iOS (which have been filtered out
1031 # by file name rules).
1032 ['include', '^test/test_file_util_mac\\.cc$'],
1035 ['OS == "ios" and _toolset == "target"', {
1037 # iOS uses its own unit test launcher.
1038 'test/launcher/unit_test_launcher.cc',
1041 ['OS == "ios" and _toolset == "host"', {
1043 'test/launcher/unit_test_launcher_ios.cc',
1044 'test/test_support_ios.h',
1045 'test/test_support_ios.mm',
1048 ], # target_conditions
1051 'target_name': 'test_support_perf',
1052 'type': 'static_library',
1055 'test_support_base',
1056 '../testing/gtest.gyp:gtest',
1059 'test/run_all_perftests.cc',
1061 'direct_dependent_settings': {
1069 ['OS=="ios" and "<(GENERATOR)"=="ninja"', {
1072 'target_name': 'test_launcher',
1073 'toolsets': ['host'],
1074 'type': 'executable',
1076 'test_support_base',
1079 'test/launcher/test_launcher_ios.cc',
1087 # GN: //base:check_example
1088 'target_name': 'check_example',
1089 'type': 'executable',
1098 'target_name': 'build_utf8_validator_tables',
1099 'type': 'executable',
1100 'toolsets': ['host'],
1103 '../third_party/icu/icu.gyp:icuuc',
1106 'i18n/build_utf8_validator_tables.cc'
1111 ['OS == "win" and target_arch=="ia32"', {
1113 # The base_win64 target here allows us to use base for Win64 targets
1114 # (the normal build is 32 bits).
1116 'target_name': 'base_win64',
1117 'type': '<(component)',
1122 'base_static_win64',
1123 'allocator/allocator.gyp:allocator_extension_thunks_win64',
1124 '../third_party/modp_b64/modp_b64.gyp:modp_b64_win64',
1125 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
1127 # TODO(gregoryd): direct_dependent_settings should be shared with the
1128 # 32-bit target, but it doesn't work due to a bug in gyp
1129 'direct_dependent_settings': {
1136 '<@(nacl_win64_defines)',
1140 'msvs_target_platform': 'x64',
1144 ['component == "shared_library"', {
1146 'debug/debug_on_start_win.cc',
1150 # Specify delayload for base_win64.dll.
1158 'AdditionalDependencies': [
1165 # Specify delayload for components that link with base_win64.lib.
1166 'all_dependent_settings': {
1174 'AdditionalDependencies': [
1182 # TODO(rvargas): Bug 78117. Remove this.
1183 'msvs_disabled_warnings': [
1189 'async_socket_io_handler.h',
1190 'async_socket_io_handler_posix.cc',
1191 'async_socket_io_handler_win.cc',
1197 'message_loop/message_pump_libevent.cc',
1198 'message_loop/message_pump_libevent.h',
1199 'metrics/field_trial.cc',
1200 'metrics/field_trial.h',
1201 'posix/file_descriptor_shuffle.cc',
1202 'posix/file_descriptor_shuffle.h',
1204 'sync_socket_posix.cc',
1205 'sync_socket_win.cc',
1206 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
1207 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
1211 'target_name': 'base_i18n_nacl_win64',
1212 'type': '<(component)',
1213 # TODO(gregoryd): direct_dependent_settings should be shared with the
1214 # 32-bit target, but it doesn't work due to a bug in gyp
1215 'direct_dependent_settings': {
1221 '<@(nacl_win64_defines)',
1222 'BASE_I18N_IMPLEMENTATION',
1228 'i18n/icu_util_nacl_win64.cc',
1232 'msvs_target_platform': 'x64',
1237 # TODO(rvargas): Remove this when gyp finally supports a clean model.
1239 'target_name': 'base_static_win64',
1240 'type': 'static_library',
1248 # base64.cc depends on modp_b64.
1256 'msvs_target_platform': 'x64',
1260 '<@(nacl_win64_defines)',
1262 # TODO(rvargas): Bug 78117. Remove this.
1263 'msvs_disabled_warnings': [
1269 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1272 'target_name': 'symbolize',
1273 'type': 'static_library',
1274 'toolsets': ['host', 'target'],
1279 ['OS == "solaris"', {
1282 '/usr/gnu/include/libelf',
1287 '-Wno-sign-compare',
1293 'GLOG_BUILD_CONFIG_INCLUDE="build/build_config.h"',
1296 'third_party/symbolize/config.h',
1297 'third_party/symbolize/demangle.cc',
1298 'third_party/symbolize/demangle.h',
1299 'third_party/symbolize/glog/logging.h',
1300 'third_party/symbolize/glog/raw_logging.h',
1301 'third_party/symbolize/symbolize.cc',
1302 'third_party/symbolize/symbolize.h',
1303 'third_party/symbolize/utilities.h',
1309 '../build/android/increase_size_for_speed.gypi',
1313 'target_name': 'xdg_mime',
1314 'type': 'static_library',
1315 'toolsets': ['host', 'target'],
1323 'third_party/xdg_mime/xdgmime.c',
1324 'third_party/xdg_mime/xdgmime.h',
1325 'third_party/xdg_mime/xdgmimealias.c',
1326 'third_party/xdg_mime/xdgmimealias.h',
1327 'third_party/xdg_mime/xdgmimecache.c',
1328 'third_party/xdg_mime/xdgmimecache.h',
1329 'third_party/xdg_mime/xdgmimeglob.c',
1330 'third_party/xdg_mime/xdgmimeglob.h',
1331 'third_party/xdg_mime/xdgmimeicon.c',
1332 'third_party/xdg_mime/xdgmimeicon.h',
1333 'third_party/xdg_mime/xdgmimeint.c',
1334 'third_party/xdg_mime/xdgmimeint.h',
1335 'third_party/xdg_mime/xdgmimemagic.c',
1336 'third_party/xdg_mime/xdgmimemagic.h',
1337 'third_party/xdg_mime/xdgmimeparent.c',
1338 'third_party/xdg_mime/xdgmimeparent.h',
1341 '../build/android/increase_size_for_speed.gypi',
1346 ['OS == "android"', {
1349 # GN: //base:base_jni_headers
1350 'target_name': 'base_jni_headers',
1353 'android/java/src/org/chromium/base/ApplicationStatus.java',
1354 'android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java',
1355 'android/java/src/org/chromium/base/BuildInfo.java',
1356 'android/java/src/org/chromium/base/CommandLine.java',
1357 'android/java/src/org/chromium/base/ContentUriUtils.java',
1358 'android/java/src/org/chromium/base/CpuFeatures.java',
1359 'android/java/src/org/chromium/base/EventLog.java',
1360 'android/java/src/org/chromium/base/FieldTrialList.java',
1361 'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java',
1362 'android/java/src/org/chromium/base/JNIUtils.java',
1363 'android/java/src/org/chromium/base/JavaHandlerThread.java',
1364 'android/java/src/org/chromium/base/LocaleUtils.java',
1365 'android/java/src/org/chromium/base/MemoryPressureListener.java',
1366 'android/java/src/org/chromium/base/PathService.java',
1367 'android/java/src/org/chromium/base/PathUtils.java',
1368 'android/java/src/org/chromium/base/PowerMonitor.java',
1369 'android/java/src/org/chromium/base/SysUtils.java',
1370 'android/java/src/org/chromium/base/SystemMessageHandler.java',
1371 'android/java/src/org/chromium/base/ThreadUtils.java',
1372 'android/java/src/org/chromium/base/TraceEvent.java',
1373 'android/java/src/org/chromium/base/library_loader/LibraryLoader.java',
1374 'android/java/src/org/chromium/base/metrics/RecordHistogram.java',
1377 'jni_gen_package': 'base',
1379 'includes': [ '../build/jni_generator.gypi' ],
1383 'target_name': 'base_unittests_jni_headers',
1386 'test/android/java/src/org/chromium/base/ContentUriTestUtils.java',
1389 'jni_gen_package': 'base',
1391 'includes': [ '../build/jni_generator.gypi' ],
1394 # GN: //base:base_native_libraries_gen
1395 'target_name': 'base_native_libraries_gen',
1398 'android/java/templates/NativeLibraries.template',
1401 'package_name': 'org/chromium/base/library_loader',
1402 'template_deps': [],
1404 'includes': [ '../build/android/java_cpp_template.gypi' ],
1407 # GN: //base:base_android_java_enums_srcjar
1408 'target_name': 'base_java_library_process_type',
1411 'source_file': 'android/library_loader/library_loader_hooks.h',
1413 'includes': [ '../build/android/java_cpp_enum.gypi' ],
1416 # GN: //base:base_java
1417 'target_name': 'base_java',
1420 'java_in_dir': '../base/android/java',
1421 'jar_excluded_classes': [ '*/NativeLibraries.class' ],
1424 'base_java_application_state',
1425 'base_java_library_load_from_apk_status_codes',
1426 'base_java_library_process_type',
1427 'base_java_memory_pressure_level',
1428 'base_native_libraries_gen',
1429 '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
1431 'includes': [ '../build/java.gypi' ],
1434 # GN: //base:base_java_unittest_support
1435 'target_name': 'base_java_unittest_support',
1441 'java_in_dir': '../base/test/android/java',
1443 'includes': [ '../build/java.gypi' ],
1446 # GN: //base:base_android_java_enums_srcjar
1447 'target_name': 'base_java_application_state',
1450 'source_file': 'android/application_status_listener.h',
1452 'includes': [ '../build/android/java_cpp_enum.gypi' ],
1455 # GN: //base:base_android_java_enums_srcjar
1456 'target_name': 'base_java_library_load_from_apk_status_codes',
1459 'source_file': 'android/library_loader/library_load_from_apk_status_codes.h'
1461 'includes': [ '../build/android/java_cpp_enum.gypi' ],
1464 # GN: //base:base_android_java_enums_srcjar
1465 'target_name': 'base_java_memory_pressure_level',
1468 'source_file': 'memory/memory_pressure_listener.h',
1470 'includes': [ '../build/android/java_cpp_enum.gypi' ],
1473 # GN: //base:base_java_test_support
1474 'target_name': 'base_java_test_support',
1480 'java_in_dir': '../base/test/android/javatests',
1482 'includes': [ '../build/java.gypi' ],
1485 # GN: //base:base_javatests
1486 'target_name': 'base_javatests',
1490 'base_java_test_support',
1493 'java_in_dir': '../base/android/javatests',
1495 'includes': [ '../build/java.gypi' ],
1498 # GN: //base/android/linker:chromium_android_linker
1499 'target_name': 'chromium_android_linker',
1500 'type': 'shared_library',
1502 'android/linker/linker_jni.cc',
1504 # The crazy linker is never instrumented.
1506 '-finstrument-functions',
1509 # The NDK contains the crazy_linker here:
1510 # '<(android_ndk_root)/crazy_linker.gyp:crazy_linker'
1511 # However, we use our own fork. See bug 384700.
1512 '../third_party/android_crazy_linker/crazy_linker.gyp:crazy_linker',
1517 'target_name': 'base_perftests_apk',
1523 'test_suite_name': 'base_perftests',
1525 'includes': [ '../build/apk_test.gypi' ],
1528 # GN: //base:base_unittests_apk
1529 'target_name': 'base_unittests_apk',
1536 'test_suite_name': 'base_unittests',
1538 'includes': [ '../build/apk_test.gypi' ],
1545 'target_name': 'debug_message',
1546 'type': 'executable',
1552 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
1557 # Target to manually rebuild pe_image_test.dll which is checked into
1558 # base/test/data/pe_image.
1559 'target_name': 'pe_image_test',
1560 'type': 'shared_library',
1562 'win/pe_image_test.cc',
1566 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
1571 'AdditionalDependencies': [
1580 ['test_isolation_mode != "noop"', {
1583 'target_name': 'base_unittests_run',
1589 '../build/isolate.gypi',
1592 'base_unittests.isolate',
1597 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',