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',
150 '<(SHARED_INTERMEDIATE_DIR)/base',
158 'debug/stack_trace_posix.cc',
161 '../build/android/cpufeatures.gypi',
164 ['OS == "android" and _toolset == "target" and android_webview_build == 0', {
171 '/usr/local/include',
175 '-L/usr/local/lib -lexecinfo',
182 # We need rt for clock_gettime().
184 # For 'native_library_linux.cc'
189 ['linux_use_tcmalloc==0', {
193 'direct_dependent_settings': {
201 ['OS == "mac" or (OS == "ios" and _toolset == "host")', {
204 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
205 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
206 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
207 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
208 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
209 '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
210 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
214 '../third_party/mach_override/mach_override.gyp:mach_override',
217 ['OS == "ios" and _toolset != "host"', {
220 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
221 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
222 '$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
223 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
224 '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
228 ['OS != "win" and OS != "ios"', {
229 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
231 ['component=="shared_library"', {
235 'debug/debug_on_start_win.cc',
240 ['use_system_nspr==1', {
242 'third_party/nspr/nspr.gyp:nspr',
247 'third_party/nspr/prcpucfg.h',
248 'third_party/nspr/prcpucfg_win.h',
249 'third_party/nspr/prtypes.h',
250 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
251 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
252 'async_socket_io_handler.h',
253 'async_socket_io_handler_posix.cc',
254 'async_socket_io_handler_win.cc',
257 'event_recorder_stubs.cc',
258 'event_recorder_win.cc',
263 'message_loop/message_pump_android.cc',
264 'message_loop/message_pump_android.h',
265 'message_loop/message_pump_glib.cc',
266 'message_loop/message_pump_glib.h',
267 'message_loop/message_pump_gtk.cc',
268 'message_loop/message_pump_gtk.h',
269 'message_loop/message_pump_io_ios.cc',
270 'message_loop/message_pump_io_ios.h',
271 'message_loop/message_pump_observer.h',
272 'message_loop/message_pump_libevent.cc',
273 'message_loop/message_pump_libevent.h',
274 'message_loop/message_pump_mac.h',
275 'message_loop/message_pump_mac.mm',
276 'message_loop/message_pump_x11.cc',
277 'message_loop/message_pump_x11.h',
278 'metrics/field_trial.cc',
279 'metrics/field_trial.h',
280 'posix/file_descriptor_shuffle.cc',
281 'posix/file_descriptor_shuffle.h',
283 'sync_socket_win.cc',
284 'sync_socket_posix.cc',
288 'target_name': 'base_i18n',
289 'type': '<(component)',
291 'enable_wexit_time_destructors': 1,
296 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
297 '../third_party/icu/icu.gyp:icui18n',
298 '../third_party/icu/icu.gyp:icuuc',
301 ['toolkit_uses_gtk==1', {
303 # i18n/rtl.cc uses gtk
304 '../build/linux/system.gyp:gtk',
308 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
309 'msvs_disabled_warnings': [
314 'export_dependent_settings': [
318 'BASE_I18N_IMPLEMENTATION',
321 'i18n/base_i18n_export.h',
322 'i18n/bidi_line_iterator.cc',
323 'i18n/bidi_line_iterator.h',
324 'i18n/break_iterator.cc',
325 'i18n/break_iterator.h',
326 'i18n/char_iterator.cc',
327 'i18n/char_iterator.h',
328 'i18n/case_conversion.cc',
329 'i18n/case_conversion.h',
330 'i18n/file_util_icu.cc',
331 'i18n/file_util_icu.h',
332 'i18n/i18n_constants.cc',
333 'i18n/i18n_constants.h',
334 'i18n/icu_encoding_detection.cc',
335 'i18n/icu_encoding_detection.h',
336 'i18n/icu_string_conversions.cc',
337 'i18n/icu_string_conversions.h',
340 'i18n/number_formatting.cc',
341 'i18n/number_formatting.h',
344 'i18n/string_compare.cc',
345 'i18n/string_compare.h',
346 'i18n/string_search.cc',
347 'i18n/string_search.h',
348 'i18n/time_formatting.cc',
349 'i18n/time_formatting.h',
355 'target_name': 'base_message_loop_tests',
356 'type': 'static_library',
359 '../testing/gtest.gyp:gtest',
362 'message_loop/message_loop_test.cc',
363 'message_loop/message_loop_test.h',
367 'target_name': 'base_prefs',
368 'type': '<(component)',
370 'enable_wexit_time_destructors': 1,
376 'export_dependent_settings': [
380 'BASE_PREFS_IMPLEMENTATION',
383 'prefs/base_prefs_export.h',
384 'prefs/default_pref_store.cc',
385 'prefs/default_pref_store.h',
386 'prefs/json_pref_store.cc',
387 'prefs/json_pref_store.h',
388 'prefs/overlay_user_pref_store.cc',
389 'prefs/overlay_user_pref_store.h',
390 'prefs/persistent_pref_store.h',
391 'prefs/pref_change_registrar.cc',
392 'prefs/pref_change_registrar.h',
393 'prefs/pref_member.cc',
394 'prefs/pref_member.h',
395 'prefs/pref_notifier.h',
396 'prefs/pref_notifier_impl.cc',
397 'prefs/pref_notifier_impl.h',
398 'prefs/pref_observer.h',
399 'prefs/pref_registry.cc',
400 'prefs/pref_registry.h',
401 'prefs/pref_registry_simple.cc',
402 'prefs/pref_registry_simple.h',
403 'prefs/pref_service.cc',
404 'prefs/pref_service.h',
405 'prefs/pref_service_factory.cc',
406 'prefs/pref_service_factory.h',
407 'prefs/pref_store.cc',
408 'prefs/pref_store.h',
409 'prefs/pref_value_map.cc',
410 'prefs/pref_value_map.h',
411 'prefs/pref_value_store.cc',
412 'prefs/pref_value_store.h',
413 'prefs/scoped_user_pref_update.cc',
414 'prefs/scoped_user_pref_update.h',
415 'prefs/value_map_pref_store.cc',
416 'prefs/value_map_pref_store.h',
420 'target_name': 'base_prefs_test_support',
421 'type': 'static_library',
425 '../testing/gmock.gyp:gmock',
428 'prefs/mock_pref_change_callback.cc',
429 'prefs/pref_store_observer_mock.cc',
430 'prefs/pref_store_observer_mock.h',
431 'prefs/testing_pref_service.cc',
432 'prefs/testing_pref_service.h',
433 'prefs/testing_pref_store.cc',
434 'prefs/testing_pref_store.h',
438 # This is the subset of files from base that should not be used with a
439 # dynamic library. Note that this library cannot depend on base because
440 # base depends on base_static.
441 'target_name': 'base_static',
442 'type': 'static_library',
444 'enable_wexit_time_destructors': 1,
447 'toolsets': ['host', 'target'],
458 # Include this target for a main() function that simply instantiates
459 # and runs a base::TestSuite.
461 'target_name': 'run_all_unittests',
462 'type': 'static_library',
467 'test/run_all_unittests.cc',
471 'target_name': 'base_unittests',
472 'type': '<(gtest_target_type)',
475 'android/activity_status_unittest.cc',
476 'android/jni_android_unittest.cc',
477 'android/jni_array_unittest.cc',
478 'android/jni_string_unittest.cc',
479 'android/path_utils_unittest.cc',
480 'android/scoped_java_ref_unittest.cc',
481 'android/sys_utils_unittest.cc',
482 'async_socket_io_handler_unittest.cc',
483 'at_exit_unittest.cc',
484 'atomicops_unittest.cc',
485 'barrier_closure_unittest.cc',
486 'base64_unittest.cc',
490 'build_time_unittest.cc',
491 'callback_helpers_unittest.cc',
492 'callback_list_unittest.cc',
493 'callback_list_unittest.nc',
494 'callback_unittest.cc',
495 'callback_unittest.nc',
496 'cancelable_callback_unittest.cc',
497 'command_line_unittest.cc',
498 'containers/hash_tables_unittest.cc',
499 'containers/linked_list_unittest.cc',
500 'containers/mru_cache_unittest.cc',
501 'containers/small_map_unittest.cc',
502 'containers/stack_container_unittest.cc',
504 'debug/crash_logging_unittest.cc',
505 'debug/leak_tracker_unittest.cc',
506 'debug/proc_maps_linux_unittest.cc',
507 'debug/stack_trace_unittest.cc',
508 'debug/trace_event_memory_unittest.cc',
509 'debug/trace_event_system_stats_monitor_unittest.cc',
510 'debug/trace_event_unittest.cc',
511 'debug/trace_event_unittest.h',
512 'debug/trace_event_win_unittest.cc',
513 'deferred_sequenced_task_runner_unittest.cc',
514 'environment_unittest.cc',
515 'file_util_unittest.cc',
516 'file_version_info_unittest.cc',
517 'files/dir_reader_posix_unittest.cc',
518 'files/file_path_unittest.cc',
519 'files/file_unittest.cc',
520 'files/file_util_proxy_unittest.cc',
521 'files/important_file_writer_unittest.cc',
522 'files/scoped_temp_dir_unittest.cc',
525 'id_map_unittest.cc',
526 'i18n/break_iterator_unittest.cc',
527 'i18n/char_iterator_unittest.cc',
528 'i18n/case_conversion_unittest.cc',
529 'i18n/file_util_icu_unittest.cc',
530 'i18n/icu_string_conversions_unittest.cc',
531 'i18n/number_formatting_unittest.cc',
532 'i18n/rtl_unittest.cc',
533 'i18n/string_search_unittest.cc',
534 'i18n/time_formatting_unittest.cc',
535 'i18n/timezone_unittest.cc',
536 'ini_parser_unittest.cc',
537 'ios/device_util_unittest.mm',
538 'json/json_parser_unittest.cc',
539 'json/json_reader_unittest.cc',
540 'json/json_value_converter_unittest.cc',
541 'json/json_value_serializer_unittest.cc',
542 'json/json_writer_unittest.cc',
543 'json/string_escape_unittest.cc',
544 'lazy_instance_unittest.cc',
545 'logging_unittest.cc',
546 'mac/bind_objc_block_unittest.mm',
547 'mac/foundation_util_unittest.mm',
548 'mac/libdispatch_task_runner_unittest.cc',
549 'mac/mac_util_unittest.mm',
550 'mac/objc_property_releaser_unittest.mm',
551 'mac/scoped_nsobject_unittest.mm',
552 'mac/scoped_sending_event_unittest.mm',
554 'memory/aligned_memory_unittest.cc',
555 'memory/discardable_memory_allocator_android_unittest.cc',
556 'memory/discardable_memory_unittest.cc',
557 'memory/discardable_memory_provider_unittest.cc',
558 'memory/linked_ptr_unittest.cc',
559 'memory/ref_counted_memory_unittest.cc',
560 'memory/ref_counted_unittest.cc',
561 'memory/scoped_ptr_unittest.cc',
562 'memory/scoped_ptr_unittest.nc',
563 'memory/scoped_vector_unittest.cc',
564 'memory/shared_memory_unittest.cc',
565 'memory/singleton_unittest.cc',
566 'memory/weak_ptr_unittest.cc',
567 'memory/weak_ptr_unittest.nc',
568 'message_loop/message_loop_proxy_impl_unittest.cc',
569 'message_loop/message_loop_proxy_unittest.cc',
570 'message_loop/message_loop_unittest.cc',
571 'message_loop/message_pump_glib_unittest.cc',
572 'message_loop/message_pump_io_ios_unittest.cc',
573 'message_loop/message_pump_libevent_unittest.cc',
574 'metrics/sample_map_unittest.cc',
575 'metrics/sample_vector_unittest.cc',
576 'metrics/bucket_ranges_unittest.cc',
577 'metrics/field_trial_unittest.cc',
578 'metrics/histogram_base_unittest.cc',
579 'metrics/histogram_delta_serialization_unittest.cc',
580 'metrics/histogram_unittest.cc',
581 'metrics/sparse_histogram_unittest.cc',
582 'metrics/stats_table_unittest.cc',
583 'metrics/statistics_recorder_unittest.cc',
584 'observer_list_unittest.cc',
585 'os_compat_android_unittest.cc',
586 'path_service_unittest.cc',
587 'pickle_unittest.cc',
588 'platform_file_unittest.cc',
589 'posix/file_descriptor_shuffle_unittest.cc',
590 'posix/unix_domain_socket_linux_unittest.cc',
591 'power_monitor/power_monitor_unittest.cc',
592 'prefs/default_pref_store_unittest.cc',
593 'prefs/json_pref_store_unittest.cc',
594 'prefs/mock_pref_change_callback.h',
595 'prefs/overlay_user_pref_store_unittest.cc',
596 'prefs/pref_change_registrar_unittest.cc',
597 'prefs/pref_member_unittest.cc',
598 'prefs/pref_notifier_impl_unittest.cc',
599 'prefs/pref_service_unittest.cc',
600 'prefs/pref_value_map_unittest.cc',
601 'prefs/pref_value_store_unittest.cc',
602 'prefs/scoped_user_pref_update_unittest.cc',
603 'process/memory_unittest.cc',
604 'process/memory_unittest_mac.h',
605 'process/memory_unittest_mac.mm',
606 'process/process_metrics_unittest.cc',
607 'process/process_metrics_unittest_ios.cc',
608 'process/process_util_unittest.cc',
609 'profiler/tracked_time_unittest.cc',
610 'rand_util_unittest.cc',
611 'safe_numerics_unittest.cc',
612 'safe_numerics_unittest.nc',
613 'scoped_clear_errno_unittest.cc',
614 'scoped_native_library_unittest.cc',
616 'security_unittest.cc',
617 'sequence_checker_unittest.cc',
619 'stl_util_unittest.cc',
620 'strings/nullable_string16_unittest.cc',
621 'strings/safe_sprintf_unittest.cc',
622 'strings/string16_unittest.cc',
623 'strings/stringprintf_unittest.cc',
624 'strings/string_number_conversions_unittest.cc',
625 'strings/string_piece_unittest.cc',
626 'strings/string_split_unittest.cc',
627 'strings/string_tokenizer_unittest.cc',
628 'strings/string_util_unittest.cc',
629 'strings/stringize_macros_unittest.cc',
630 'strings/sys_string_conversions_mac_unittest.mm',
631 'strings/sys_string_conversions_unittest.cc',
632 'strings/utf_offset_string_conversions_unittest.cc',
633 'strings/utf_string_conversions_unittest.cc',
634 'sync_socket_unittest.cc',
635 'synchronization/cancellation_flag_unittest.cc',
636 'synchronization/condition_variable_unittest.cc',
637 'synchronization/lock_unittest.cc',
638 'synchronization/waitable_event_unittest.cc',
639 'synchronization/waitable_event_watcher_unittest.cc',
640 'sys_info_unittest.cc',
641 'system_monitor/system_monitor_unittest.cc',
642 'task_runner_util_unittest.cc',
643 'template_util_unittest.cc',
644 'test/expectations/expectation_unittest.cc',
645 'test/expectations/parser_unittest.cc',
646 'test/test_reg_util_win_unittest.cc',
647 'test/trace_event_analyzer_unittest.cc',
648 'threading/non_thread_safe_unittest.cc',
649 'threading/platform_thread_unittest.cc',
650 'threading/sequenced_worker_pool_unittest.cc',
651 'threading/simple_thread_unittest.cc',
652 'threading/thread_checker_unittest.cc',
653 'threading/thread_collision_warner_unittest.cc',
654 'threading/thread_id_name_manager_unittest.cc',
655 'threading/thread_local_storage_unittest.cc',
656 'threading/thread_local_unittest.cc',
657 'threading/thread_unittest.cc',
658 'threading/watchdog_unittest.cc',
659 'threading/worker_pool_posix_unittest.cc',
660 'threading/worker_pool_unittest.cc',
661 'time/pr_time_unittest.cc',
662 'time/time_unittest.cc',
663 'time/time_win_unittest.cc',
664 'timer/hi_res_timer_manager_unittest.cc',
665 'timer/timer_unittest.cc',
666 'tools_sanity_unittest.cc',
667 'tracked_objects_unittest.cc',
669 'values_unittest.cc',
670 'version_unittest.cc',
673 'win/enum_variant_unittest.cc',
674 'win/event_trace_consumer_unittest.cc',
675 'win/event_trace_controller_unittest.cc',
676 'win/event_trace_provider_unittest.cc',
677 'win/i18n_unittest.cc',
678 'win/iunknown_impl_unittest.cc',
679 'win/message_window_unittest.cc',
680 'win/object_watcher_unittest.cc',
681 'win/pe_image_unittest.cc',
682 'win/registry_unittest.cc',
683 'win/scoped_bstr_unittest.cc',
684 'win/scoped_comptr_unittest.cc',
685 'win/scoped_process_information_unittest.cc',
686 'win/scoped_variant_unittest.cc',
687 'win/shortcut_unittest.cc',
688 'win/startup_information_unittest.cc',
689 'win/win_util_unittest.cc',
690 'win/wrapped_window_proc_unittest.cc',
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 ['desktop_linux == 1 or chromeos == 1', {
718 ['OS == "android"', {
720 'android/jni_generator/jni_generator.gyp:jni_generator_tests',
723 ['gtest_target_type == "shared_library"', {
725 '../testing/android/native_test.gyp:native_test_native_code',
730 ['OS == "ios" and _toolset != "host"', {
732 # Only test the iOS-meaningful portion of process_utils.
733 ['exclude', '^process/memory_unittest'],
734 ['exclude', '^process/process_util_unittest\\.cc$'],
735 ['include', '^process/process_util_unittest_ios\\.cc$'],
736 # Requires spawning processes.
737 ['exclude', '^metrics/stats_table_unittest\\.cc$'],
738 # iOS does not use message_pump_libevent.
739 ['exclude', '^message_loop/message_pump_libevent_unittest\\.cc$'],
743 'action_name': 'copy_test_data',
748 'test_data_prefix': 'base',
750 'includes': [ '../build/copy_test_data_ios.gypi' ],
754 ['desktop_linux == 1 or chromeos == 1', {
756 'file_version_info_unittest.cc',
759 [ 'toolkit_uses_gtk==1', {
761 'nix/xdg_util_unittest.cc',
764 '../build/linux/system.gyp:gtk',
769 '../build/linux/system.gyp:ssl',
774 '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
779 '../build/linux/system.gyp:glib',
783 'message_loop/message_pump_glib_unittest.cc',
788 'message_loop/message_pump_glib_unittest.cc',
791 ['OS == "linux" and linux_use_tcmalloc==1', {
793 'allocator/allocator.gyp:allocator',
798 # This is needed to trigger the dll copy step on windows.
799 # TODO(mark): This should not be necessary.
801 '../third_party/icu/icu.gyp:icudata',
804 'file_descriptor_shuffle_unittest.cc',
805 'files/dir_reader_posix_unittest.cc',
806 'threading/worker_pool_posix_unittest.cc',
807 'message_loop/message_pump_libevent_unittest.cc',
809 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
810 'msvs_disabled_warnings': [
813 # This is needed so base_unittests uses the allocator shim, as
814 # SecurityTest.MemoryAllocationRestriction* tests are dependent
816 # TODO(wfh): crbug.com/246278 Move tcmalloc specific tests into
817 # their own test suite.
819 ['win_use_allocator_shim==1', {
821 'allocator/allocator.gyp:allocator',
827 '../third_party/libevent/libevent.gyp:libevent'
830 ['exclude', '^win/'],
833 'win/win_util_unittest.cc',
836 ['use_aura==1 and use_x11==1', {
838 'x11/edid_parser_x11_unittest.cc',
841 ['use_system_nspr==1', {
843 'third_party/nspr/nspr.gyp:nspr',
847 'target_conditions': [
848 ['OS == "ios" and _toolset != "host"', {
850 # Pull in specific Mac files for iOS (which have been filtered out
851 # by file name rules).
852 ['include', '^mac/objc_property_releaser_unittest\\.mm$'],
853 ['include', '^mac/bind_objc_block_unittest\\.mm$'],
854 ['include', '^mac/scoped_nsobject_unittest\\.mm$'],
855 ['include', '^sys_string_conversions_mac_unittest\\.mm$'],
858 ['OS == "android"', {
860 ['include', '^debug/proc_maps_linux_unittest\\.cc$'],
863 ], # target_conditions
866 'target_name': 'test_support_base',
867 'type': 'static_library',
872 '../testing/gmock.gyp:gmock',
873 '../testing/gtest.gyp:gtest',
874 '../third_party/libxml/libxml.gyp:libxml',
875 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
877 'export_dependent_settings': [
881 ['toolkit_uses_gtk==1', {
883 # test_suite initializes GTK.
884 '../build/linux/system.gyp:gtk',
889 'test/scoped_locale.cc',
890 'test/scoped_locale.h',
895 'test/test_file_util_linux.cc',
898 ['OS == "android"', {
900 'base_unittests_jni_headers',
901 'base_java_unittest_support',
904 '<(SHARED_INTERMEDIATE_DIR)/base',
909 'test/expectations/expectation.cc',
910 'test/expectations/expectation.h',
911 'test/expectations/parser.cc',
912 'test/expectations/parser.h',
913 'test/gtest_xml_util.cc',
914 'test/gtest_xml_util.h',
915 'test/launcher/test_launcher.cc',
916 'test/launcher/test_launcher.h',
917 'test/launcher/test_result.cc',
918 'test/launcher/test_result.h',
919 'test/launcher/test_results_tracker.cc',
920 'test/launcher/test_results_tracker.h',
921 'test/launcher/unit_test_launcher.cc',
922 'test/launcher/unit_test_launcher.h',
923 'test/launcher/unit_test_launcher_ios.cc',
924 'test/mock_chrome_application_mac.h',
925 'test/mock_chrome_application_mac.mm',
926 'test/mock_devices_changed_observer.cc',
927 'test/mock_devices_changed_observer.h',
928 'test/mock_time_provider.cc',
929 'test/mock_time_provider.h',
930 'test/multiprocess_test.cc',
931 'test/multiprocess_test.h',
932 'test/multiprocess_test_android.cc',
933 'test/null_task_runner.cc',
934 'test/null_task_runner.h',
937 'test/perf_test_suite.cc',
938 'test/perf_test_suite.h',
939 'test/perf_time_logger.cc',
940 'test/perf_time_logger.h',
941 'test/power_monitor_test_base.cc',
942 'test/power_monitor_test_base.h',
943 'test/scoped_locale.cc',
944 'test/scoped_locale.h',
945 'test/scoped_path_override.cc',
946 'test/scoped_path_override.h',
947 'test/sequenced_task_runner_test_template.cc',
948 'test/sequenced_task_runner_test_template.h',
949 'test/sequenced_worker_pool_owner.cc',
950 'test/sequenced_worker_pool_owner.h',
951 'test/simple_test_clock.cc',
952 'test/simple_test_clock.h',
953 'test/simple_test_tick_clock.cc',
954 'test/simple_test_tick_clock.h',
955 'test/task_runner_test_template.cc',
956 'test/task_runner_test_template.h',
957 'test/test_file_util.cc',
958 'test/test_file_util.h',
959 'test/test_file_util_android.cc',
960 'test/test_file_util_linux.cc',
961 'test/test_file_util_mac.cc',
962 'test/test_file_util_posix.cc',
963 'test/test_file_util_win.cc',
964 'test/test_listener_ios.h',
965 'test/test_listener_ios.mm',
966 'test/test_pending_task.cc',
967 'test/test_pending_task.h',
968 'test/test_process_killer_win.cc',
969 'test/test_process_killer_win.h',
970 'test/test_reg_util_win.cc',
971 'test/test_reg_util_win.h',
972 'test/test_shortcut_win.cc',
973 'test/test_shortcut_win.h',
974 'test/test_simple_task_runner.cc',
975 'test/test_simple_task_runner.h',
976 'test/test_suite.cc',
978 'test/test_support_android.cc',
979 'test/test_support_android.h',
980 'test/test_support_ios.h',
981 'test/test_support_ios.mm',
982 'test/test_switches.cc',
983 'test/test_switches.h',
984 'test/test_timeouts.cc',
985 'test/test_timeouts.h',
986 'test/thread_test_helper.cc',
987 'test/thread_test_helper.h',
988 'test/trace_event_analyzer.cc',
989 'test/trace_event_analyzer.h',
990 'test/values_test_util.cc',
991 'test/values_test_util.h',
993 'target_conditions': [
996 # Pull in specific Mac files for iOS (which have been filtered out
997 # by file name rules).
998 ['include', '^test/test_file_util_mac\\.cc$'],
1001 # iOS uses its own unit test launcher.
1002 'test/launcher/unit_test_launcher.cc',
1005 ], # target_conditions
1008 'target_name': 'test_support_perf',
1009 'type': 'static_library',
1012 'test_support_base',
1013 '../testing/gtest.gyp:gtest',
1016 'test/run_all_perftests.cc',
1018 'direct_dependent_settings': {
1024 ['toolkit_uses_gtk==1', {
1026 # Needed to handle the #include chain:
1027 # base/test/perf_test_suite.h
1028 # base/test/test_suite.h
1030 '../build/linux/system.gyp:gtk',
1040 'target_name': 'check_example',
1041 'type': 'executable',
1051 ['OS == "win" and target_arch=="ia32"', {
1054 'target_name': 'base_nacl_win64',
1055 'type': '<(component)',
1060 'base_static_win64',
1061 'allocator/allocator.gyp:allocator_extension_thunks_win64',
1062 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
1064 # TODO(gregoryd): direct_dependent_settings should be shared with the
1065 # 32-bit target, but it doesn't work due to a bug in gyp
1066 'direct_dependent_settings': {
1072 '<@(nacl_win64_defines)',
1075 # base64.cc depends on modp_b64.
1080 'msvs_target_platform': 'x64',
1084 ['component == "shared_library"', {
1086 'debug/debug_on_start_win.cc',
1092 'target_name': 'base_i18n_nacl_win64',
1093 'type': '<(component)',
1094 # TODO(gregoryd): direct_dependent_settings should be shared with the
1095 # 32-bit target, but it doesn't work due to a bug in gyp
1096 'direct_dependent_settings': {
1102 '<@(nacl_win64_defines)',
1103 'BASE_I18N_IMPLEMENTATION',
1109 'i18n/icu_util_nacl_win64.cc',
1113 'msvs_target_platform': 'x64',
1118 # TODO(rvargas): Remove this when gyp finally supports a clean model.
1120 'target_name': 'base_static_win64',
1121 'type': 'static_library',
1129 # base64.cc depends on modp_b64.
1137 'msvs_target_platform': 'x64',
1143 # TODO(rvargas): Bug 78117. Remove this.
1144 'msvs_disabled_warnings': [
1150 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1153 'target_name': 'symbolize',
1154 'type': 'static_library',
1155 'toolsets': ['host', 'target'],
1160 ['OS == "solaris"', {
1163 '/usr/gnu/include/libelf',
1168 '-Wno-sign-compare',
1174 'third_party/symbolize/config.h',
1175 'third_party/symbolize/demangle.cc',
1176 'third_party/symbolize/demangle.h',
1177 'third_party/symbolize/glog/logging.h',
1178 'third_party/symbolize/glog/raw_logging.h',
1179 'third_party/symbolize/symbolize.cc',
1180 'third_party/symbolize/symbolize.h',
1181 'third_party/symbolize/utilities.h',
1188 'target_name': 'xdg_mime',
1189 'type': 'static_library',
1190 'toolsets': ['host', 'target'],
1198 'third_party/xdg_mime/xdgmime.c',
1199 'third_party/xdg_mime/xdgmime.h',
1200 'third_party/xdg_mime/xdgmimealias.c',
1201 'third_party/xdg_mime/xdgmimealias.h',
1202 'third_party/xdg_mime/xdgmimecache.c',
1203 'third_party/xdg_mime/xdgmimecache.h',
1204 'third_party/xdg_mime/xdgmimeglob.c',
1205 'third_party/xdg_mime/xdgmimeglob.h',
1206 'third_party/xdg_mime/xdgmimeicon.c',
1207 'third_party/xdg_mime/xdgmimeicon.h',
1208 'third_party/xdg_mime/xdgmimeint.c',
1209 'third_party/xdg_mime/xdgmimeint.h',
1210 'third_party/xdg_mime/xdgmimemagic.c',
1211 'third_party/xdg_mime/xdgmimemagic.h',
1212 'third_party/xdg_mime/xdgmimeparent.c',
1213 'third_party/xdg_mime/xdgmimeparent.h',
1218 ['OS == "android"', {
1221 'target_name': 'base_jni_headers',
1224 'android/java/src/org/chromium/base/ActivityStatus.java',
1225 'android/java/src/org/chromium/base/BuildInfo.java',
1226 'android/java/src/org/chromium/base/CommandLine.java',
1227 'android/java/src/org/chromium/base/ContentUriUtils.java',
1228 'android/java/src/org/chromium/base/CpuFeatures.java',
1229 'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java',
1230 'android/java/src/org/chromium/base/MemoryPressureListener.java',
1231 'android/java/src/org/chromium/base/JavaHandlerThread.java',
1232 'android/java/src/org/chromium/base/PathService.java',
1233 'android/java/src/org/chromium/base/PathUtils.java',
1234 'android/java/src/org/chromium/base/PowerMonitor.java',
1235 'android/java/src/org/chromium/base/SystemMessageHandler.java',
1236 'android/java/src/org/chromium/base/SysUtils.java',
1237 'android/java/src/org/chromium/base/ThreadUtils.java',
1242 'android/java/src/org/chromium/base/ContextTypes.java',
1247 'jni_gen_package': 'base',
1248 'jni_generator_ptr_type': 'long',
1250 'includes': [ '../build/jni_generator.gypi' ],
1253 'target_name': 'base_unittests_jni_headers',
1256 'test/android/java/src/org/chromium/base/ContentUriTestUtils.java',
1259 'jni_gen_package': 'base',
1261 'includes': [ '../build/jni_generator.gypi' ],
1264 'target_name': 'base_java',
1267 'java_in_dir': '../base/android/java',
1270 'base_java_activity_state',
1271 'base_java_memory_pressure_level_list',
1273 'includes': [ '../build/java.gypi' ],
1275 ['android_webview_build==0', {
1277 '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
1283 'target_name': 'base_java_unittest_support',
1289 'java_in_dir': '../base/test/android/java',
1291 'includes': [ '../build/java.gypi' ],
1294 'target_name': 'base_java_activity_state',
1296 # This target is used to auto-generate ActivityState.java
1297 # from a template file. The source file contains a list of
1298 # Java constant declarations matching the ones in
1299 # android/activity_state_list.h.
1301 'android/java/src/org/chromium/base/ActivityState.template',
1304 'package_name': 'org/chromium/base',
1305 'template_deps': ['android/activity_state_list.h'],
1307 'includes': [ '../build/android/java_cpp_template.gypi' ],
1310 'target_name': 'base_java_memory_pressure_level_list',
1313 'android/java/src/org/chromium/base/MemoryPressureLevelList.template',
1316 'package_name': 'org/chromium/base',
1317 'template_deps': ['memory/memory_pressure_level_list.h'],
1319 'includes': [ '../build/android/java_cpp_template.gypi' ],
1322 'target_name': 'base_java_test_support',
1328 'java_in_dir': '../base/test/android/javatests',
1330 'includes': [ '../build/java.gypi' ],
1333 'target_name': 'base_javatests',
1337 'base_java_test_support',
1340 'java_in_dir': '../base/android/javatests',
1342 'includes': [ '../build/java.gypi' ],
1349 'target_name': 'debug_message',
1350 'type': 'executable',
1356 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
1362 # Special target to wrap a gtest_target_type == shared_library
1363 # base_unittests into an android apk for execution.
1364 # TODO(jrg): lib.target comes from _InstallableTargetInstallPath()
1365 # in the gyp make generator. What is the correct way to extract
1366 # this path from gyp and into 'raw' for input to antfiles?
1367 # Hard-coding in the gypfile seems a poor choice.
1368 ['OS == "android" and gtest_target_type == "shared_library"', {
1371 'target_name': 'base_unittests_apk',
1378 'test_suite_name': 'base_unittests',
1379 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)base_unittests<(SHARED_LIB_SUFFIX)',
1381 'includes': [ '../build/apk_test.gypi' ],
1385 ['test_isolation_mode != "noop"', {
1388 'target_name': 'base_unittests_run',
1394 '../build/isolate.gypi',
1395 'base_unittests.isolate',
1398 'base_unittests.isolate',