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$'],
107 '../third_party/ashmem/ashmem.gyp:ashmem',
115 'debug/stack_trace_posix.cc',
118 '../build/android/cpufeatures.gypi',
121 ['OS == "android" and _toolset == "target" and android_webview_build == 0', {
128 '/usr/local/include',
132 '-L/usr/local/lib -lexecinfo',
139 # We need rt for clock_gettime().
141 # For 'native_library_linux.cc'
146 # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
147 ['use_allocator!="tcmalloc" and (use_allocator!="see_use_tcmalloc" or linux_use_tcmalloc==0)', {
151 'direct_dependent_settings': {
159 ['OS == "mac" or (OS == "ios" and _toolset == "host")', {
162 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
163 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
164 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
165 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
166 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
167 '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
168 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
172 '../third_party/mach_override/mach_override.gyp:mach_override',
175 ['OS == "ios" and _toolset != "host"', {
178 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
179 '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
180 '$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
181 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
182 '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
186 ['OS != "win" and OS != "ios"', {
187 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
189 ['component=="shared_library"', {
193 'debug/debug_on_start_win.cc',
200 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
201 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
202 'async_socket_io_handler.h',
203 'async_socket_io_handler_posix.cc',
204 'async_socket_io_handler_win.cc',
207 'event_recorder_stubs.cc',
208 'event_recorder_win.cc',
211 'message_loop/message_pump_android.cc',
212 'message_loop/message_pump_android.h',
213 'message_loop/message_pump_glib.cc',
214 'message_loop/message_pump_glib.h',
215 'message_loop/message_pump_io_ios.cc',
216 'message_loop/message_pump_io_ios.h',
217 'message_loop/message_pump_observer.h',
218 'message_loop/message_pump_libevent.cc',
219 'message_loop/message_pump_libevent.h',
220 'message_loop/message_pump_mac.h',
221 'message_loop/message_pump_mac.mm',
222 'metrics/field_trial.cc',
223 'metrics/field_trial.h',
224 'posix/file_descriptor_shuffle.cc',
225 'posix/file_descriptor_shuffle.h',
227 'sync_socket_win.cc',
228 'sync_socket_posix.cc',
232 'target_name': 'base_i18n',
233 'type': '<(component)',
235 'enable_wexit_time_destructors': 1,
237 'base_i18n_target': 1,
241 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
242 '../third_party/icu/icu.gyp:icui18n',
243 '../third_party/icu/icu.gyp:icuuc',
247 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
248 'msvs_disabled_warnings': [
252 ['icu_use_data_file_flag==1', {
253 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
254 }, { # else icu_use_data_file_flag !=1
257 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
259 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
264 'export_dependent_settings': [
271 'target_name': 'base_message_loop_tests',
272 'type': 'static_library',
275 '../testing/gtest.gyp:gtest',
278 'message_loop/message_loop_test.cc',
279 'message_loop/message_loop_test.h',
283 'target_name': 'base_prefs',
284 'type': '<(component)',
286 'enable_wexit_time_destructors': 1,
292 'export_dependent_settings': [
296 'BASE_PREFS_IMPLEMENTATION',
299 'prefs/base_prefs_export.h',
300 'prefs/default_pref_store.cc',
301 'prefs/default_pref_store.h',
302 'prefs/json_pref_store.cc',
303 'prefs/json_pref_store.h',
304 'prefs/overlay_user_pref_store.cc',
305 'prefs/overlay_user_pref_store.h',
306 'prefs/persistent_pref_store.h',
307 'prefs/pref_change_registrar.cc',
308 'prefs/pref_change_registrar.h',
309 'prefs/pref_filter.h',
310 'prefs/pref_member.cc',
311 'prefs/pref_member.h',
312 'prefs/pref_notifier.h',
313 'prefs/pref_notifier_impl.cc',
314 'prefs/pref_notifier_impl.h',
315 'prefs/pref_observer.h',
316 'prefs/pref_registry.cc',
317 'prefs/pref_registry.h',
318 'prefs/pref_registry_simple.cc',
319 'prefs/pref_registry_simple.h',
320 'prefs/pref_service.cc',
321 'prefs/pref_service.h',
322 'prefs/pref_service_factory.cc',
323 'prefs/pref_service_factory.h',
324 'prefs/pref_store.cc',
325 'prefs/pref_store.h',
326 'prefs/pref_value_map.cc',
327 'prefs/pref_value_map.h',
328 'prefs/pref_value_store.cc',
329 'prefs/pref_value_store.h',
330 'prefs/scoped_user_pref_update.cc',
331 'prefs/scoped_user_pref_update.h',
332 'prefs/value_map_pref_store.cc',
333 'prefs/value_map_pref_store.h',
334 'prefs/writeable_pref_store.h',
338 'target_name': 'base_prefs_test_support',
339 'type': 'static_library',
343 '../testing/gmock.gyp:gmock',
346 'prefs/mock_pref_change_callback.cc',
347 'prefs/pref_store_observer_mock.cc',
348 'prefs/pref_store_observer_mock.h',
349 'prefs/testing_pref_service.cc',
350 'prefs/testing_pref_service.h',
351 'prefs/testing_pref_store.cc',
352 'prefs/testing_pref_store.h',
356 # This is the subset of files from base that should not be used with a
357 # dynamic library. Note that this library cannot depend on base because
358 # base depends on base_static.
359 'target_name': 'base_static',
360 'type': 'static_library',
362 'enable_wexit_time_destructors': 1,
365 'toolsets': ['host', 'target'],
376 # Include this target for a main() function that simply instantiates
377 # and runs a base::TestSuite.
379 'target_name': 'run_all_unittests',
380 'type': 'static_library',
385 'test/run_all_unittests.cc',
389 'target_name': 'base_unittests',
390 'type': '<(gtest_target_type)',
392 'android/application_status_listener_unittest.cc',
393 'android/jni_android_unittest.cc',
394 'android/jni_array_unittest.cc',
395 'android/jni_string_unittest.cc',
396 'android/path_utils_unittest.cc',
397 'android/scoped_java_ref_unittest.cc',
398 'android/sys_utils_unittest.cc',
399 'async_socket_io_handler_unittest.cc',
400 'at_exit_unittest.cc',
401 'atomicops_unittest.cc',
402 'barrier_closure_unittest.cc',
403 'base64_unittest.cc',
404 'big_endian_unittest.cc',
408 'build_time_unittest.cc',
409 'callback_helpers_unittest.cc',
410 'callback_list_unittest.cc',
411 'callback_list_unittest.nc',
412 'callback_unittest.cc',
413 'callback_unittest.nc',
414 'cancelable_callback_unittest.cc',
415 'command_line_unittest.cc',
416 'containers/hash_tables_unittest.cc',
417 'containers/linked_list_unittest.cc',
418 'containers/mru_cache_unittest.cc',
419 'containers/small_map_unittest.cc',
420 'containers/stack_container_unittest.cc',
422 'debug/crash_logging_unittest.cc',
423 'debug/leak_tracker_unittest.cc',
424 'debug/proc_maps_linux_unittest.cc',
425 'debug/stack_trace_unittest.cc',
426 'debug/trace_event_memory_unittest.cc',
427 'debug/trace_event_synthetic_delay_unittest.cc',
428 'debug/trace_event_system_stats_monitor_unittest.cc',
429 'debug/trace_event_unittest.cc',
430 'debug/trace_event_unittest.h',
431 'debug/trace_event_win_unittest.cc',
432 'deferred_sequenced_task_runner_unittest.cc',
433 'environment_unittest.cc',
434 'file_util_unittest.cc',
435 'file_version_info_unittest.cc',
436 'files/dir_reader_posix_unittest.cc',
437 'files/file_path_unittest.cc',
438 'files/file_proxy_unittest.cc',
439 'files/file_unittest.cc',
440 'files/file_util_proxy_unittest.cc',
441 'files/important_file_writer_unittest.cc',
442 'files/scoped_temp_dir_unittest.cc',
446 'id_map_unittest.cc',
447 'i18n/break_iterator_unittest.cc',
448 'i18n/char_iterator_unittest.cc',
449 'i18n/case_conversion_unittest.cc',
450 'i18n/file_util_icu_unittest.cc',
451 'i18n/icu_string_conversions_unittest.cc',
452 'i18n/number_formatting_unittest.cc',
453 'i18n/rtl_unittest.cc',
454 'i18n/streaming_utf8_validator_unittest.cc',
455 'i18n/string_search_unittest.cc',
456 'i18n/time_formatting_unittest.cc',
457 'i18n/timezone_unittest.cc',
458 'ini_parser_unittest.cc',
459 'ios/device_util_unittest.mm',
460 'json/json_parser_unittest.cc',
461 'json/json_reader_unittest.cc',
462 'json/json_value_converter_unittest.cc',
463 'json/json_value_serializer_unittest.cc',
464 'json/json_writer_unittest.cc',
465 'json/string_escape_unittest.cc',
466 'lazy_instance_unittest.cc',
467 'logging_unittest.cc',
468 'mac/bind_objc_block_unittest.mm',
469 'mac/foundation_util_unittest.mm',
470 'mac/libdispatch_task_runner_unittest.cc',
471 'mac/mac_util_unittest.mm',
472 'mac/objc_property_releaser_unittest.mm',
473 'mac/scoped_nsobject_unittest.mm',
474 'mac/scoped_sending_event_unittest.mm',
476 'memory/aligned_memory_unittest.cc',
477 'memory/discardable_memory_allocator_android_unittest.cc',
478 'memory/discardable_memory_manager_unittest.cc',
479 'memory/discardable_memory_unittest.cc',
480 'memory/linked_ptr_unittest.cc',
481 'memory/ref_counted_memory_unittest.cc',
482 'memory/ref_counted_unittest.cc',
483 'memory/scoped_ptr_unittest.cc',
484 'memory/scoped_ptr_unittest.nc',
485 'memory/scoped_vector_unittest.cc',
486 'memory/shared_memory_unittest.cc',
487 'memory/singleton_unittest.cc',
488 'memory/weak_ptr_unittest.cc',
489 'memory/weak_ptr_unittest.nc',
490 'message_loop/message_loop_proxy_impl_unittest.cc',
491 'message_loop/message_loop_proxy_unittest.cc',
492 'message_loop/message_loop_unittest.cc',
493 'message_loop/message_pump_glib_unittest.cc',
494 'message_loop/message_pump_io_ios_unittest.cc',
495 'message_loop/message_pump_libevent_unittest.cc',
496 'metrics/sample_map_unittest.cc',
497 'metrics/sample_vector_unittest.cc',
498 'metrics/bucket_ranges_unittest.cc',
499 'metrics/field_trial_unittest.cc',
500 'metrics/histogram_base_unittest.cc',
501 'metrics/histogram_delta_serialization_unittest.cc',
502 'metrics/histogram_snapshot_manager_unittest.cc',
503 'metrics/histogram_unittest.cc',
504 'metrics/sparse_histogram_unittest.cc',
505 'metrics/stats_table_unittest.cc',
506 'metrics/statistics_recorder_unittest.cc',
507 'observer_list_unittest.cc',
508 'os_compat_android_unittest.cc',
509 'path_service_unittest.cc',
510 'pickle_unittest.cc',
511 'platform_file_unittest.cc',
512 'posix/file_descriptor_shuffle_unittest.cc',
513 'posix/unix_domain_socket_linux_unittest.cc',
514 'power_monitor/power_monitor_unittest.cc',
515 'prefs/default_pref_store_unittest.cc',
516 'prefs/json_pref_store_unittest.cc',
517 'prefs/mock_pref_change_callback.h',
518 'prefs/overlay_user_pref_store_unittest.cc',
519 'prefs/pref_change_registrar_unittest.cc',
520 'prefs/pref_member_unittest.cc',
521 'prefs/pref_notifier_impl_unittest.cc',
522 'prefs/pref_service_unittest.cc',
523 'prefs/pref_value_map_unittest.cc',
524 'prefs/pref_value_store_unittest.cc',
525 'prefs/scoped_user_pref_update_unittest.cc',
526 'process/memory_unittest.cc',
527 'process/memory_unittest_mac.h',
528 'process/memory_unittest_mac.mm',
529 'process/process_metrics_unittest.cc',
530 'process/process_metrics_unittest_ios.cc',
531 'process/process_util_unittest.cc',
532 'profiler/tracked_time_unittest.cc',
533 'rand_util_unittest.cc',
534 'numerics/safe_numerics_unittest.cc',
535 'scoped_clear_errno_unittest.cc',
536 'scoped_generic_unittest.cc',
537 'scoped_native_library_unittest.cc',
539 'security_unittest.cc',
540 'sequence_checker_unittest.cc',
542 'stl_util_unittest.cc',
543 'strings/nullable_string16_unittest.cc',
544 'strings/safe_sprintf_unittest.cc',
545 'strings/string16_unittest.cc',
546 'strings/stringprintf_unittest.cc',
547 'strings/string_number_conversions_unittest.cc',
548 'strings/string_piece_unittest.cc',
549 'strings/string_split_unittest.cc',
550 'strings/string_tokenizer_unittest.cc',
551 'strings/string_util_unittest.cc',
552 'strings/stringize_macros_unittest.cc',
553 'strings/sys_string_conversions_mac_unittest.mm',
554 'strings/sys_string_conversions_unittest.cc',
555 'strings/utf_offset_string_conversions_unittest.cc',
556 'strings/utf_string_conversions_unittest.cc',
557 'sync_socket_unittest.cc',
558 'synchronization/cancellation_flag_unittest.cc',
559 'synchronization/condition_variable_unittest.cc',
560 'synchronization/lock_unittest.cc',
561 'synchronization/waitable_event_unittest.cc',
562 'synchronization/waitable_event_watcher_unittest.cc',
563 'sys_info_unittest.cc',
564 'system_monitor/system_monitor_unittest.cc',
565 'task/cancelable_task_tracker_unittest.cc',
566 'task_runner_util_unittest.cc',
567 'template_util_unittest.cc',
568 'test/expectations/expectation_unittest.cc',
569 'test/expectations/parser_unittest.cc',
570 'test/statistics_delta_reader_unittest.cc',
571 'test/test_reg_util_win_unittest.cc',
572 'test/trace_event_analyzer_unittest.cc',
573 'threading/non_thread_safe_unittest.cc',
574 'threading/platform_thread_unittest.cc',
575 'threading/sequenced_worker_pool_unittest.cc',
576 'threading/simple_thread_unittest.cc',
577 'threading/thread_checker_unittest.cc',
578 'threading/thread_collision_warner_unittest.cc',
579 'threading/thread_id_name_manager_unittest.cc',
580 'threading/thread_local_storage_unittest.cc',
581 'threading/thread_local_unittest.cc',
582 'threading/thread_unittest.cc',
583 'threading/watchdog_unittest.cc',
584 'threading/worker_pool_posix_unittest.cc',
585 'threading/worker_pool_unittest.cc',
586 'time/pr_time_unittest.cc',
587 'time/time_unittest.cc',
588 'time/time_win_unittest.cc',
589 'timer/hi_res_timer_manager_unittest.cc',
590 'timer/mock_timer_unittest.cc',
591 'timer/timer_unittest.cc',
592 'tools_sanity_unittest.cc',
593 'tracked_objects_unittest.cc',
595 'values_unittest.cc',
596 'version_unittest.cc',
599 'win/enum_variant_unittest.cc',
600 'win/event_trace_consumer_unittest.cc',
601 'win/event_trace_controller_unittest.cc',
602 'win/event_trace_provider_unittest.cc',
603 'win/i18n_unittest.cc',
604 'win/iunknown_impl_unittest.cc',
605 'win/message_window_unittest.cc',
606 'win/object_watcher_unittest.cc',
607 'win/pe_image_unittest.cc',
608 'win/registry_unittest.cc',
609 'win/scoped_bstr_unittest.cc',
610 'win/scoped_comptr_unittest.cc',
611 'win/scoped_process_information_unittest.cc',
612 'win/scoped_variant_unittest.cc',
613 'win/shortcut_unittest.cc',
614 'win/startup_information_unittest.cc',
615 'win/win_util_unittest.cc',
616 'win/wrapped_window_proc_unittest.cc',
621 'base_message_loop_tests',
623 'base_prefs_test_support',
627 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
628 '../testing/gmock.gyp:gmock',
629 '../testing/gtest.gyp:gtest',
630 '../third_party/icu/icu.gyp:icui18n',
631 '../third_party/icu/icu.gyp:icuuc',
633 'includes': ['../build/nocompile.gypi'],
635 # TODO(ajwong): Is there a way to autodetect this?
639 ['OS == "android"', {
641 'android/jni_generator/jni_generator.gyp:jni_generator_tests',
644 ['gtest_target_type == "shared_library"', {
646 '../testing/android/native_test.gyp:native_test_native_code',
651 ['OS == "ios" and _toolset != "host"', {
653 # Only test the iOS-meaningful portion of process_utils.
654 ['exclude', '^process/memory_unittest'],
655 ['exclude', '^process/process_util_unittest\\.cc$'],
656 ['include', '^process/process_util_unittest_ios\\.cc$'],
657 # Requires spawning processes.
658 ['exclude', '^metrics/stats_table_unittest\\.cc$'],
659 # iOS does not use message_pump_libevent.
660 ['exclude', '^message_loop/message_pump_libevent_unittest\\.cc$'],
664 'action_name': 'copy_test_data',
669 'test_data_prefix': 'base',
671 'includes': [ '../build/copy_test_data_ios.gypi' ],
675 ['desktop_linux == 1 or chromeos == 1', {
680 'file_version_info_unittest.cc',
683 [ 'desktop_linux==1', {
685 'nix/xdg_util_unittest.cc',
692 '../build/linux/system.gyp:glib',
696 'message_loop/message_pump_glib_unittest.cc',
701 'message_loop/message_pump_glib_unittest.cc',
704 # TODO(dmikurube): Kill linux_use_tcmalloc. http://crbug.com/345554
705 ['OS == "linux" and ((use_allocator!="none" and use_allocator!="see_use_tcmalloc") or (use_allocator=="see_use_tcmalloc" and linux_use_tcmalloc==1))', {
707 'allocator/allocator.gyp:allocator',
713 'file_descriptor_shuffle_unittest.cc',
714 'files/dir_reader_posix_unittest.cc',
715 'threading/worker_pool_posix_unittest.cc',
716 'message_loop/message_pump_libevent_unittest.cc',
718 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
719 'msvs_disabled_warnings': [
723 # This is needed so base_unittests uses the allocator shim, as
724 # SecurityTest.MemoryAllocationRestriction* tests are dependent
726 # TODO(wfh): crbug.com/246278 Move tcmalloc specific tests into
727 # their own test suite.
728 ['win_use_allocator_shim==1', {
730 'allocator/allocator.gyp:allocator',
733 ['icu_use_data_file_flag==0', {
734 # This is needed to trigger the dll copy step on windows.
735 # TODO(mark): This should not be necessary.
737 '../third_party/icu/icu.gyp:icudata',
743 '../third_party/libevent/libevent.gyp:libevent'
747 'target_conditions': [
748 ['OS == "ios" and _toolset != "host"', {
750 # Pull in specific Mac files for iOS (which have been filtered out
751 # by file name rules).
752 ['include', '^mac/bind_objc_block_unittest\\.mm$'],
753 ['include', '^mac/foundation_util_unittest\\.mm$',],
754 ['include', '^mac/objc_property_releaser_unittest\\.mm$'],
755 ['include', '^mac/scoped_nsobject_unittest\\.mm$'],
756 ['include', '^sys_string_conversions_mac_unittest\\.mm$'],
759 ['OS == "android"', {
761 ['include', '^debug/proc_maps_linux_unittest\\.cc$'],
764 ], # target_conditions
767 'target_name': 'base_perftests',
768 'type': '<(gtest_target_type)',
772 '../testing/gtest.gyp:gtest',
775 'threading/thread_perftest.cc',
776 'test/run_all_unittests.cc',
777 '../testing/perf/perf_test.cc'
780 ['OS == "android" and gtest_target_type == "shared_library"', {
782 '../testing/android/native_test.gyp:native_test_native_code',
788 'target_name': 'base_i18n_perftests',
789 'type': '<(gtest_target_type)',
793 '../testing/gtest.gyp:gtest',
798 'i18n/streaming_utf8_validator_perftest.cc',
802 'target_name': 'test_support_base',
803 'type': 'static_library',
808 '../testing/gmock.gyp:gmock',
809 '../testing/gtest.gyp:gtest',
810 '../third_party/libxml/libxml.gyp:libxml',
811 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
813 'export_dependent_settings': [
819 'test/scoped_locale.cc',
820 'test/scoped_locale.h',
825 'test/test_file_util_linux.cc',
828 ['OS == "android"', {
830 'base_unittests_jni_headers',
831 'base_java_unittest_support',
836 'test/expectations/expectation.cc',
837 'test/expectations/expectation.h',
838 'test/expectations/parser.cc',
839 'test/expectations/parser.h',
840 'test/gtest_xml_util.cc',
841 'test/gtest_xml_util.h',
842 'test/launcher/test_launcher.cc',
843 'test/launcher/test_launcher.h',
844 'test/launcher/test_result.cc',
845 'test/launcher/test_result.h',
846 'test/launcher/test_results_tracker.cc',
847 'test/launcher/test_results_tracker.h',
848 'test/launcher/unit_test_launcher.cc',
849 'test/launcher/unit_test_launcher.h',
850 'test/launcher/unit_test_launcher_ios.cc',
851 'test/mock_chrome_application_mac.h',
852 'test/mock_chrome_application_mac.mm',
853 'test/mock_devices_changed_observer.cc',
854 'test/mock_devices_changed_observer.h',
855 'test/mock_time_provider.cc',
856 'test/mock_time_provider.h',
857 'test/multiprocess_test.cc',
858 'test/multiprocess_test.h',
859 'test/multiprocess_test_android.cc',
860 'test/null_task_runner.cc',
861 'test/null_task_runner.h',
864 'test/perf_test_suite.cc',
865 'test/perf_test_suite.h',
866 'test/perf_time_logger.cc',
867 'test/perf_time_logger.h',
868 'test/power_monitor_test_base.cc',
869 'test/power_monitor_test_base.h',
870 'test/scoped_locale.cc',
871 'test/scoped_locale.h',
872 'test/scoped_path_override.cc',
873 'test/scoped_path_override.h',
874 'test/sequenced_task_runner_test_template.cc',
875 'test/sequenced_task_runner_test_template.h',
876 'test/sequenced_worker_pool_owner.cc',
877 'test/sequenced_worker_pool_owner.h',
878 'test/simple_test_clock.cc',
879 'test/simple_test_clock.h',
880 'test/simple_test_tick_clock.cc',
881 'test/simple_test_tick_clock.h',
882 'test/statistics_delta_reader.cc',
883 'test/statistics_delta_reader.h',
884 'test/task_runner_test_template.cc',
885 'test/task_runner_test_template.h',
886 'test/test_file_util.cc',
887 'test/test_file_util.h',
888 'test/test_file_util_android.cc',
889 'test/test_file_util_linux.cc',
890 'test/test_file_util_mac.cc',
891 'test/test_file_util_posix.cc',
892 'test/test_file_util_win.cc',
893 'test/test_listener_ios.h',
894 'test/test_listener_ios.mm',
895 'test/test_pending_task.cc',
896 'test/test_pending_task.h',
897 'test/test_process_killer_win.cc',
898 'test/test_process_killer_win.h',
899 'test/test_reg_util_win.cc',
900 'test/test_reg_util_win.h',
901 'test/test_shortcut_win.cc',
902 'test/test_shortcut_win.h',
903 'test/test_simple_task_runner.cc',
904 'test/test_simple_task_runner.h',
905 'test/test_suite.cc',
907 'test/test_support_android.cc',
908 'test/test_support_android.h',
909 'test/test_support_ios.h',
910 'test/test_support_ios.mm',
911 'test/test_switches.cc',
912 'test/test_switches.h',
913 'test/test_timeouts.cc',
914 'test/test_timeouts.h',
915 'test/thread_test_helper.cc',
916 'test/thread_test_helper.h',
917 'test/trace_event_analyzer.cc',
918 'test/trace_event_analyzer.h',
919 'test/values_test_util.cc',
920 'test/values_test_util.h',
922 'target_conditions': [
925 # Pull in specific Mac files for iOS (which have been filtered out
926 # by file name rules).
927 ['include', '^test/test_file_util_mac\\.cc$'],
930 # iOS uses its own unit test launcher.
931 'test/launcher/unit_test_launcher.cc',
934 ], # target_conditions
937 'target_name': 'test_support_perf',
938 'type': 'static_library',
942 '../testing/gtest.gyp:gtest',
945 'test/run_all_perftests.cc',
947 'direct_dependent_settings': {
954 'target_name': 'sanitizer_options',
955 'type': 'static_library',
956 'toolsets': ['host', 'target'],
958 # Every target is going to depend on sanitizer_options, so allow
959 # this one to depend on itself.
960 'prune_self_dependency': 1,
961 # Do not let 'none' targets depend on this one, they don't need to.
962 'link_dependency': 1,
965 'debug/sanitizer_options.cc',
970 # Some targets may want to opt-out from ASan, TSan and MSan and link
971 # without the corresponding runtime libraries. We drop the libc++
972 # dependency and omit the compiler flags to avoid bringing instrumented
973 # code to those targets.
975 ['use_custom_libcxx==1', {
977 '../third_party/libc++/libc++.gyp:libc++',
978 '../third_party/libc++abi/libc++abi.gyp:libc++abi',
983 '-fsanitize=address',
986 '-fsanitize-memory-track-origins',
988 'direct_dependent_settings': {
990 '-Wl,-u_sanitizer_options_link_helper',
999 'target_name': 'check_example',
1000 'type': 'executable',
1009 'target_name': 'build_utf8_validator_tables',
1010 'type': 'executable',
1011 'toolsets': ['host'],
1014 '../third_party/icu/icu.gyp:icuuc',
1017 'i18n/build_utf8_validator_tables.cc'
1022 ['OS == "win" and target_arch=="ia32"', {
1024 # The base_win64 target here allows us to use base for Win64 targets
1025 # (the normal build is 32 bits).
1027 'target_name': 'base_win64',
1028 'type': '<(component)',
1033 'base_static_win64',
1034 'allocator/allocator.gyp:allocator_extension_thunks_win64',
1035 '../third_party/modp_b64/modp_b64.gyp:modp_b64_win64',
1036 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
1038 # TODO(gregoryd): direct_dependent_settings should be shared with the
1039 # 32-bit target, but it doesn't work due to a bug in gyp
1040 'direct_dependent_settings': {
1047 '<@(nacl_win64_defines)',
1051 'msvs_target_platform': 'x64',
1055 ['component == "shared_library"', {
1057 'debug/debug_on_start_win.cc',
1061 # TODO(rvargas): Bug 78117. Remove this.
1062 'msvs_disabled_warnings': [
1068 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
1069 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
1070 'async_socket_io_handler.h',
1071 'async_socket_io_handler_posix.cc',
1072 'async_socket_io_handler_win.cc',
1075 'event_recorder_stubs.cc',
1076 'event_recorder_win.cc',
1081 'message_loop/message_pump_observer.h',
1082 'message_loop/message_pump_libevent.cc',
1083 'message_loop/message_pump_libevent.h',
1084 'metrics/field_trial.cc',
1085 'metrics/field_trial.h',
1086 'posix/file_descriptor_shuffle.cc',
1087 'posix/file_descriptor_shuffle.h',
1089 'sync_socket_win.cc',
1090 'sync_socket_posix.cc',
1094 'target_name': 'base_i18n_nacl_win64',
1095 'type': '<(component)',
1096 # TODO(gregoryd): direct_dependent_settings should be shared with the
1097 # 32-bit target, but it doesn't work due to a bug in gyp
1098 'direct_dependent_settings': {
1104 '<@(nacl_win64_defines)',
1105 'BASE_I18N_IMPLEMENTATION',
1111 'i18n/icu_util_nacl_win64.cc',
1115 'msvs_target_platform': 'x64',
1120 # TODO(rvargas): Remove this when gyp finally supports a clean model.
1122 'target_name': 'base_static_win64',
1123 'type': 'static_library',
1131 # base64.cc depends on modp_b64.
1139 'msvs_target_platform': 'x64',
1143 '<@(nacl_win64_defines)',
1145 # TODO(rvargas): Bug 78117. Remove this.
1146 'msvs_disabled_warnings': [
1152 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1155 'target_name': 'symbolize',
1156 'type': 'static_library',
1157 'toolsets': ['host', 'target'],
1162 ['OS == "solaris"', {
1165 '/usr/gnu/include/libelf',
1170 '-Wno-sign-compare',
1176 'GLOG_BUILD_CONFIG_INCLUDE="build/build_config.h"',
1179 'third_party/symbolize/config.h',
1180 'third_party/symbolize/demangle.cc',
1181 'third_party/symbolize/demangle.h',
1182 'third_party/symbolize/glog/logging.h',
1183 'third_party/symbolize/glog/raw_logging.h',
1184 'third_party/symbolize/symbolize.cc',
1185 'third_party/symbolize/symbolize.h',
1186 'third_party/symbolize/utilities.h',
1193 'target_name': 'xdg_mime',
1194 'type': 'static_library',
1195 'toolsets': ['host', 'target'],
1203 'third_party/xdg_mime/xdgmime.c',
1204 'third_party/xdg_mime/xdgmime.h',
1205 'third_party/xdg_mime/xdgmimealias.c',
1206 'third_party/xdg_mime/xdgmimealias.h',
1207 'third_party/xdg_mime/xdgmimecache.c',
1208 'third_party/xdg_mime/xdgmimecache.h',
1209 'third_party/xdg_mime/xdgmimeglob.c',
1210 'third_party/xdg_mime/xdgmimeglob.h',
1211 'third_party/xdg_mime/xdgmimeicon.c',
1212 'third_party/xdg_mime/xdgmimeicon.h',
1213 'third_party/xdg_mime/xdgmimeint.c',
1214 'third_party/xdg_mime/xdgmimeint.h',
1215 'third_party/xdg_mime/xdgmimemagic.c',
1216 'third_party/xdg_mime/xdgmimemagic.h',
1217 'third_party/xdg_mime/xdgmimeparent.c',
1218 'third_party/xdg_mime/xdgmimeparent.h',
1223 ['OS == "android"', {
1226 'target_name': 'base_jni_headers',
1229 'android/java/src/org/chromium/base/ApplicationStatus.java',
1230 'android/java/src/org/chromium/base/BuildInfo.java',
1231 'android/java/src/org/chromium/base/CommandLine.java',
1232 'android/java/src/org/chromium/base/ContentUriUtils.java',
1233 'android/java/src/org/chromium/base/CpuFeatures.java',
1234 'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java',
1235 'android/java/src/org/chromium/base/library_loader/LibraryLoader.java',
1236 'android/java/src/org/chromium/base/MemoryPressureListener.java',
1237 'android/java/src/org/chromium/base/JavaHandlerThread.java',
1238 'android/java/src/org/chromium/base/PathService.java',
1239 'android/java/src/org/chromium/base/PathUtils.java',
1240 'android/java/src/org/chromium/base/PowerMonitor.java',
1241 'android/java/src/org/chromium/base/SystemMessageHandler.java',
1242 'android/java/src/org/chromium/base/SysUtils.java',
1243 'android/java/src/org/chromium/base/ThreadUtils.java',
1244 'android/java/src/org/chromium/base/TraceEvent.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',
1260 'jni_generator_ptr_type': 'long',
1262 'includes': [ '../build/jni_generator.gypi' ],
1265 'target_name': 'base_native_libraries_gen',
1268 'android/java/templates/NativeLibraries.template',
1271 'package_name': 'org/chromium/base/library_loader',
1272 'include_path': 'android/java/templates',
1274 'android/java/templates/native_libraries_array.h'
1277 'includes': [ '../build/android/java_cpp_template.gypi' ],
1280 'target_name': 'base_java',
1283 'java_in_dir': '../base/android/java',
1284 'jar_excluded_classes': [ '*/NativeLibraries.class' ],
1287 'base_java_application_state',
1288 'base_java_memory_pressure_level_list',
1289 'base_native_libraries_gen',
1291 'includes': [ '../build/java.gypi' ],
1293 ['android_webview_build==0', {
1295 '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
1301 'target_name': 'base_java_unittest_support',
1307 'java_in_dir': '../base/test/android/java',
1309 'includes': [ '../build/java.gypi' ],
1312 'target_name': 'base_java_application_state',
1314 # This target is used to auto-generate ApplicationState.java
1315 # from a template file. The source file contains a list of
1316 # Java constant declarations matching the ones in
1317 # android/application_state_list.h.
1319 'android/java/src/org/chromium/base/ApplicationState.template',
1322 'package_name': 'org/chromium/base',
1323 'template_deps': ['android/application_state_list.h'],
1325 'includes': [ '../build/android/java_cpp_template.gypi' ],
1328 'target_name': 'base_java_memory_pressure_level_list',
1331 'android/java/src/org/chromium/base/MemoryPressureLevelList.template',
1334 'package_name': 'org/chromium/base',
1335 'template_deps': ['memory/memory_pressure_level_list.h'],
1337 'includes': [ '../build/android/java_cpp_template.gypi' ],
1340 'target_name': 'base_java_test_support',
1346 'java_in_dir': '../base/test/android/javatests',
1348 'includes': [ '../build/java.gypi' ],
1351 'target_name': 'base_javatests',
1355 'base_java_test_support',
1358 'java_in_dir': '../base/android/javatests',
1360 'includes': [ '../build/java.gypi' ],
1363 'target_name': 'chromium_android_linker',
1364 'type': 'shared_library',
1366 ['android_webview_build == 0', {
1367 # Avoid breaking the webview build because it doesn't have
1368 # <(android_ndk_root)/crazy_linker.gyp. Note that it never uses
1369 # the linker anyway.
1371 'android/linker/linker_jni.cc',
1374 '<(android_ndk_root)/crazy_linker.gyp:crazy_linker',
1382 ['OS == "android" and gtest_target_type == "shared_library"', {
1385 'target_name': 'base_perftests_apk',
1391 'test_suite_name': 'base_perftests',
1393 'includes': [ '../build/apk_test.gypi' ],
1400 'target_name': 'debug_message',
1401 'type': 'executable',
1407 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS
1413 # Special target to wrap a gtest_target_type == shared_library
1414 # base_unittests into an android apk for execution.
1415 # TODO(jrg): lib.target comes from _InstallableTargetInstallPath()
1416 # in the gyp make generator. What is the correct way to extract
1417 # this path from gyp and into 'raw' for input to antfiles?
1418 # Hard-coding in the gypfile seems a poor choice.
1419 ['OS == "android" and gtest_target_type == "shared_library"', {
1422 'target_name': 'base_unittests_apk',
1429 'test_suite_name': 'base_unittests',
1431 'includes': [ '../build/apk_test.gypi' ],
1435 ['test_isolation_mode != "noop"', {
1438 'target_name': 'base_unittests_run',
1444 '../build/isolate.gypi',
1445 'base_unittests.isolate',
1448 'base_unittests.isolate',