Home | History | Annotate | Download | only in base
      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.
      4 
      5 {
      6   'variables': {
      7     'chromium_code': 1,
      8   },
      9   'includes': [
     10     '../build/win_precompile.gypi',
     11     'base.gypi',
     12   ],
     13   'targets': [
     14     {
     15       'target_name': 'base',
     16       'type': '<(component)',
     17       'toolsets': ['host', 'target'],
     18       'variables': {
     19         'base_target': 1,
     20         'enable_wexit_time_destructors': 1,
     21         'optimize': 'max',
     22       },
     23       'dependencies': [
     24         'base_static',
     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',
     29       ],
     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': {
     33         'include_dirs': [
     34           '..',
     35         ],
     36       },
     37       'conditions': [
     38         ['desktop_linux == 1 or chromeos == 1', {
     39           'conditions': [
     40             ['chromeos==1', {
     41               'sources/': [ ['include', '_chromeos\\.cc$'] ]
     42             }],
     43           ],
     44           'dependencies': [
     45             'symbolize',
     46             'xdg_mime',
     47           ],
     48           'defines': [
     49             'USE_SYMBOLIZE',
     50           ],
     51         }, {  # desktop_linux == 0 and chromeos == 0
     52             'sources/': [
     53               ['exclude', '/xdg_user_dirs/'],
     54               ['exclude', '_nss\\.cc$'],
     55             ],
     56         }],
     57         ['use_glib==1', {
     58           'dependencies': [
     59             '../build/linux/system.gyp:glib',
     60           ],
     61           'export_dependent_settings': [
     62             '../build/linux/system.gyp:glib',
     63           ],
     64         }],
     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
     72           # need base on host.
     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.
     80           'conditions': [
     81             ['host_os == "mac"', {
     82               'sources/': [
     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$'],
     88               ],
     89             }],
     90           ],
     91         }],
     92         ['OS == "android" and _toolset == "target"', {
     93           'conditions': [
     94             ['target_arch == "ia32" or target_arch == "x64"', {
     95               'sources/': [
     96                 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
     97               ],
     98             }],
     99             ['target_arch == "mipsel"', {
    100               'sources/': [
    101                 ['include', '^atomicops_internals_mips_gcc\\.cc$'],
    102               ],
    103             }],
    104           ],
    105           'dependencies': [
    106             'base_jni_headers',
    107             '../third_party/ashmem/ashmem.gyp:ashmem',
    108           ],
    109           'link_settings': {
    110             'libraries': [
    111               '-llog',
    112             ],
    113           },
    114           'sources!': [
    115             'debug/stack_trace_posix.cc',
    116           ],
    117           'includes': [
    118             '../build/android/cpufeatures.gypi',
    119           ],
    120         }],
    121         ['OS == "android" and _toolset == "target" and android_webview_build == 0', {
    122           'dependencies': [
    123             'base_java',
    124           ],
    125         }],
    126         ['os_bsd==1', {
    127           'include_dirs': [
    128             '/usr/local/include',
    129           ],
    130           'link_settings': {
    131             'libraries': [
    132               '-L/usr/local/lib -lexecinfo',
    133             ],
    134           },
    135         }],
    136         ['OS == "linux"', {
    137           'link_settings': {
    138             'libraries': [
    139               # We need rt for clock_gettime().
    140               '-lrt',
    141               # For 'native_library_linux.cc'
    142               '-ldl',
    143             ],
    144           },
    145           'conditions': [
    146             ['use_allocator!="tcmalloc"', {
    147               'defines': [
    148                 'NO_TCMALLOC',
    149               ],
    150               'direct_dependent_settings': {
    151                 'defines': [
    152                   'NO_TCMALLOC',
    153                 ],
    154               },
    155             }],
    156           ],
    157         }],
    158         ['OS == "win"', {
    159           # Specify delayload for base.dll.
    160           'msvs_settings': {
    161             'VCLinkerTool': {
    162               'DelayLoadDLLs': [
    163                 'powrprof.dll',
    164               ],
    165               'AdditionalDependencies': [
    166                 'powrprof.lib',
    167               ],
    168             },
    169           },
    170           # Specify delayload for components that link with base.lib.
    171           'all_dependent_settings': {
    172             'msvs_settings': {
    173               'VCLinkerTool': {
    174                 'DelayLoadDLLs': [
    175                   'powrprof.dll',
    176                 ],
    177                 'AdditionalDependencies': [
    178                   'powrprof.lib',
    179                 ],
    180               },
    181             },
    182           },
    183         }],
    184         ['OS == "mac" or (OS == "ios" and _toolset == "host")', {
    185           'link_settings': {
    186             'libraries': [
    187               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
    188               '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
    189               '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
    190               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
    191               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
    192               '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
    193               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
    194             ],
    195           },
    196           'dependencies': [
    197             '../third_party/mach_override/mach_override.gyp:mach_override',
    198           ],
    199         }],
    200         ['OS == "ios" and _toolset != "host"', {
    201           'link_settings': {
    202             'libraries': [
    203               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
    204               '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
    205               '$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
    206               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
    207               '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
    208             ],
    209           },
    210         }],
    211         ['OS != "win" and OS != "ios"', {
    212             'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
    213         },],
    214         ['component=="shared_library"', {
    215           'conditions': [
    216             ['OS=="win"', {
    217               'sources!': [
    218                 'debug/debug_on_start_win.cc',
    219               ],
    220             }],
    221           ],
    222         }],
    223       ],
    224       'sources': [
    225         'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
    226         'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
    227         'async_socket_io_handler.h',
    228         'async_socket_io_handler_posix.cc',
    229         'async_socket_io_handler_win.cc',
    230         'auto_reset.h',
    231         'event_recorder.h',
    232         'event_recorder_stubs.cc',
    233         'event_recorder_win.cc',
    234         'linux_util.cc',
    235         'linux_util.h',
    236         'message_loop/message_pump_android.cc',
    237         'message_loop/message_pump_android.h',
    238         'message_loop/message_pump_glib.cc',
    239         'message_loop/message_pump_glib.h',
    240         'message_loop/message_pump_io_ios.cc',
    241         'message_loop/message_pump_io_ios.h',
    242         'message_loop/message_pump_observer.h',
    243         'message_loop/message_pump_libevent.cc',
    244         'message_loop/message_pump_libevent.h',
    245         'message_loop/message_pump_mac.h',
    246         'message_loop/message_pump_mac.mm',
    247         'metrics/field_trial.cc',
    248         'metrics/field_trial.h',
    249         'posix/file_descriptor_shuffle.cc',
    250         'posix/file_descriptor_shuffle.h',
    251         'sync_socket.h',
    252         'sync_socket_win.cc',
    253         'sync_socket_posix.cc',
    254       ],
    255     },
    256     {
    257       'target_name': 'base_i18n',
    258       'type': '<(component)',
    259       'variables': {
    260         'enable_wexit_time_destructors': 1,
    261         'optimize': 'max',
    262         'base_i18n_target': 1,
    263       },
    264       'dependencies': [
    265         'base',
    266         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
    267         '../third_party/icu/icu.gyp:icui18n',
    268         '../third_party/icu/icu.gyp:icuuc',
    269       ],
    270       'conditions': [
    271         ['OS == "win"', {
    272           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
    273           'msvs_disabled_warnings': [
    274             4267,
    275           ],
    276         }],
    277         ['icu_use_data_file_flag==1', {
    278           'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
    279         }, { # else icu_use_data_file_flag !=1
    280           'conditions': [
    281             ['OS=="win"', {
    282               'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
    283             }, {
    284               'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
    285             }],
    286           ],
    287         }],
    288       ],
    289       'export_dependent_settings': [
    290         'base',
    291       ],
    292 
    293 
    294     },
    295     {
    296       'target_name': 'base_message_loop_tests',
    297       'type': 'static_library',
    298       'dependencies': [
    299         'base',
    300         '../testing/gtest.gyp:gtest',
    301       ],
    302       'sources': [
    303         'message_loop/message_loop_test.cc',
    304         'message_loop/message_loop_test.h',
    305       ],
    306     },
    307     {
    308       'target_name': 'base_prefs',
    309       'type': '<(component)',
    310       'variables': {
    311         'enable_wexit_time_destructors': 1,
    312         'optimize': 'max',
    313       },
    314       'dependencies': [
    315         'base',
    316       ],
    317       'export_dependent_settings': [
    318         'base',
    319       ],
    320       'defines': [
    321         'BASE_PREFS_IMPLEMENTATION',
    322       ],
    323       'sources': [
    324         'prefs/base_prefs_export.h',
    325         'prefs/default_pref_store.cc',
    326         'prefs/default_pref_store.h',
    327         'prefs/json_pref_store.cc',
    328         'prefs/json_pref_store.h',
    329         'prefs/overlay_user_pref_store.cc',
    330         'prefs/overlay_user_pref_store.h',
    331         'prefs/persistent_pref_store.h',
    332         'prefs/pref_change_registrar.cc',
    333         'prefs/pref_change_registrar.h',
    334         'prefs/pref_filter.h',
    335         'prefs/pref_member.cc',
    336         'prefs/pref_member.h',
    337         'prefs/pref_notifier.h',
    338         'prefs/pref_notifier_impl.cc',
    339         'prefs/pref_notifier_impl.h',
    340         'prefs/pref_observer.h',
    341         'prefs/pref_registry.cc',
    342         'prefs/pref_registry.h',
    343         'prefs/pref_registry_simple.cc',
    344         'prefs/pref_registry_simple.h',
    345         'prefs/pref_service.cc',
    346         'prefs/pref_service.h',
    347         'prefs/pref_service_factory.cc',
    348         'prefs/pref_service_factory.h',
    349         'prefs/pref_store.cc',
    350         'prefs/pref_store.h',
    351         'prefs/pref_value_map.cc',
    352         'prefs/pref_value_map.h',
    353         'prefs/pref_value_store.cc',
    354         'prefs/pref_value_store.h',
    355         'prefs/scoped_user_pref_update.cc',
    356         'prefs/scoped_user_pref_update.h',
    357         'prefs/value_map_pref_store.cc',
    358         'prefs/value_map_pref_store.h',
    359         'prefs/writeable_pref_store.h',
    360       ],
    361     },
    362     {
    363       'target_name': 'base_prefs_test_support',
    364       'type': 'static_library',
    365       'dependencies': [
    366         'base',
    367         'base_prefs',
    368         '../testing/gmock.gyp:gmock',
    369       ],
    370       'sources': [
    371         'prefs/mock_pref_change_callback.cc',
    372         'prefs/pref_store_observer_mock.cc',
    373         'prefs/pref_store_observer_mock.h',
    374         'prefs/testing_pref_service.cc',
    375         'prefs/testing_pref_service.h',
    376         'prefs/testing_pref_store.cc',
    377         'prefs/testing_pref_store.h',
    378       ],
    379     },
    380     {
    381       # This is the subset of files from base that should not be used with a
    382       # dynamic library. Note that this library cannot depend on base because
    383       # base depends on base_static.
    384       'target_name': 'base_static',
    385       'type': 'static_library',
    386       'variables': {
    387         'enable_wexit_time_destructors': 1,
    388         'optimize': 'max',
    389       },
    390       'toolsets': ['host', 'target'],
    391       'sources': [
    392         'base_switches.cc',
    393         'base_switches.h',
    394         'win/pe_image.cc',
    395         'win/pe_image.h',
    396       ],
    397       'include_dirs': [
    398         '..',
    399       ],
    400     },
    401     # Include this target for a main() function that simply instantiates
    402     # and runs a base::TestSuite.
    403     {
    404       'target_name': 'run_all_unittests',
    405       'type': 'static_library',
    406       'dependencies': [
    407         'test_support_base',
    408       ],
    409       'sources': [
    410         'test/run_all_unittests.cc',
    411       ],
    412     },
    413     {
    414       'target_name': 'base_unittests',
    415       'type': '<(gtest_target_type)',
    416       'sources': [
    417         'android/application_status_listener_unittest.cc',
    418         'android/jni_android_unittest.cc',
    419         'android/jni_array_unittest.cc',
    420         'android/jni_string_unittest.cc',
    421         'android/path_utils_unittest.cc',
    422         'android/scoped_java_ref_unittest.cc',
    423         'android/sys_utils_unittest.cc',
    424         'async_socket_io_handler_unittest.cc',
    425         'at_exit_unittest.cc',
    426         'atomicops_unittest.cc',
    427         'barrier_closure_unittest.cc',
    428         'base64_unittest.cc',
    429         'big_endian_unittest.cc',
    430         'bind_unittest.cc',
    431         'bind_unittest.nc',
    432         'bits_unittest.cc',
    433         'build_time_unittest.cc',
    434         'callback_helpers_unittest.cc',
    435         'callback_list_unittest.cc',
    436         'callback_list_unittest.nc',
    437         'callback_unittest.cc',
    438         'callback_unittest.nc',
    439         'cancelable_callback_unittest.cc',
    440         'command_line_unittest.cc',
    441         'containers/hash_tables_unittest.cc',
    442         'containers/linked_list_unittest.cc',
    443         'containers/mru_cache_unittest.cc',
    444         'containers/small_map_unittest.cc',
    445         'containers/stack_container_unittest.cc',
    446         'cpu_unittest.cc',
    447         'debug/crash_logging_unittest.cc',
    448         'debug/leak_tracker_unittest.cc',
    449         'debug/proc_maps_linux_unittest.cc',
    450         'debug/stack_trace_unittest.cc',
    451         'debug/trace_event_memory_unittest.cc',
    452         'debug/trace_event_synthetic_delay_unittest.cc',
    453         'debug/trace_event_system_stats_monitor_unittest.cc',
    454         'debug/trace_event_unittest.cc',
    455         'debug/trace_event_unittest.h',
    456         'debug/trace_event_win_unittest.cc',
    457         'deferred_sequenced_task_runner_unittest.cc',
    458         'environment_unittest.cc',
    459         'file_util_unittest.cc',
    460         'file_version_info_unittest.cc',
    461         'files/dir_reader_posix_unittest.cc',
    462         'files/file_path_unittest.cc',
    463         'files/file_proxy_unittest.cc',
    464         'files/file_unittest.cc',
    465         'files/file_util_proxy_unittest.cc',
    466         'files/important_file_writer_unittest.cc',
    467         'files/memory_mapped_file_unittest.cc',
    468         'files/scoped_temp_dir_unittest.cc',
    469         'gmock_unittest.cc',
    470         'guid_unittest.cc',
    471         'hash_unittest.cc',
    472         'id_map_unittest.cc',
    473         'i18n/break_iterator_unittest.cc',
    474         'i18n/char_iterator_unittest.cc',
    475         'i18n/case_conversion_unittest.cc',
    476         'i18n/file_util_icu_unittest.cc',
    477         'i18n/icu_string_conversions_unittest.cc',
    478         'i18n/number_formatting_unittest.cc',
    479         'i18n/rtl_unittest.cc',
    480         'i18n/streaming_utf8_validator_unittest.cc',
    481         'i18n/string_search_unittest.cc',
    482         'i18n/time_formatting_unittest.cc',
    483         'i18n/timezone_unittest.cc',
    484         'ini_parser_unittest.cc',
    485         'ios/device_util_unittest.mm',
    486         'json/json_parser_unittest.cc',
    487         'json/json_reader_unittest.cc',
    488         'json/json_value_converter_unittest.cc',
    489         'json/json_value_serializer_unittest.cc',
    490         'json/json_writer_unittest.cc',
    491         'json/string_escape_unittest.cc',
    492         'lazy_instance_unittest.cc',
    493         'logging_unittest.cc',
    494         'mac/bind_objc_block_unittest.mm',
    495         'mac/foundation_util_unittest.mm',
    496         'mac/libdispatch_task_runner_unittest.cc',
    497         'mac/mac_util_unittest.mm',
    498         'mac/objc_property_releaser_unittest.mm',
    499         'mac/scoped_nsobject_unittest.mm',
    500         'mac/scoped_sending_event_unittest.mm',
    501         'md5_unittest.cc',
    502         'memory/aligned_memory_unittest.cc',
    503         'memory/discardable_memory_manager_unittest.cc',
    504         'memory/discardable_memory_unittest.cc',
    505         'memory/linked_ptr_unittest.cc',
    506         'memory/ref_counted_memory_unittest.cc',
    507         'memory/ref_counted_unittest.cc',
    508         'memory/scoped_ptr_unittest.cc',
    509         'memory/scoped_ptr_unittest.nc',
    510         'memory/scoped_vector_unittest.cc',
    511         'memory/shared_memory_unittest.cc',
    512         'memory/singleton_unittest.cc',
    513         'memory/weak_ptr_unittest.cc',
    514         'memory/weak_ptr_unittest.nc',
    515         'message_loop/message_loop_proxy_impl_unittest.cc',
    516         'message_loop/message_loop_proxy_unittest.cc',
    517         'message_loop/message_loop_unittest.cc',
    518         'message_loop/message_pump_glib_unittest.cc',
    519         'message_loop/message_pump_io_ios_unittest.cc',
    520         'message_loop/message_pump_libevent_unittest.cc',
    521         'metrics/sample_map_unittest.cc',
    522         'metrics/sample_vector_unittest.cc',
    523         'metrics/bucket_ranges_unittest.cc',
    524         'metrics/field_trial_unittest.cc',
    525         'metrics/histogram_base_unittest.cc',
    526         'metrics/histogram_delta_serialization_unittest.cc',
    527         'metrics/histogram_snapshot_manager_unittest.cc',
    528         'metrics/histogram_unittest.cc',
    529         'metrics/sparse_histogram_unittest.cc',
    530         'metrics/stats_table_unittest.cc',
    531         'metrics/statistics_recorder_unittest.cc',
    532         'observer_list_unittest.cc',
    533         'os_compat_android_unittest.cc',
    534         'path_service_unittest.cc',
    535         'pickle_unittest.cc',
    536         'platform_file_unittest.cc',
    537         'posix/file_descriptor_shuffle_unittest.cc',
    538         'posix/unix_domain_socket_linux_unittest.cc',
    539         'power_monitor/power_monitor_unittest.cc',
    540         'prefs/default_pref_store_unittest.cc',
    541         'prefs/json_pref_store_unittest.cc',
    542         'prefs/mock_pref_change_callback.h',
    543         'prefs/overlay_user_pref_store_unittest.cc',
    544         'prefs/pref_change_registrar_unittest.cc',
    545         'prefs/pref_member_unittest.cc',
    546         'prefs/pref_notifier_impl_unittest.cc',
    547         'prefs/pref_service_unittest.cc',
    548         'prefs/pref_value_map_unittest.cc',
    549         'prefs/pref_value_store_unittest.cc',
    550         'prefs/scoped_user_pref_update_unittest.cc',
    551         'process/memory_unittest.cc',
    552         'process/memory_unittest_mac.h',
    553         'process/memory_unittest_mac.mm',
    554         'process/process_metrics_unittest.cc',
    555         'process/process_metrics_unittest_ios.cc',
    556         'process/process_util_unittest.cc',
    557         'profiler/tracked_time_unittest.cc',
    558         'rand_util_unittest.cc',
    559         'numerics/safe_numerics_unittest.cc',
    560         'scoped_clear_errno_unittest.cc',
    561         'scoped_generic_unittest.cc',
    562         'scoped_native_library_unittest.cc',
    563         'scoped_observer.h',
    564         'security_unittest.cc',
    565         'sequence_checker_unittest.cc',
    566         'sha1_unittest.cc',
    567         'stl_util_unittest.cc',
    568         'strings/nullable_string16_unittest.cc',
    569         'strings/safe_sprintf_unittest.cc',
    570         'strings/string16_unittest.cc',
    571         'strings/stringprintf_unittest.cc',
    572         'strings/string_number_conversions_unittest.cc',
    573         'strings/string_piece_unittest.cc',
    574         'strings/string_split_unittest.cc',
    575         'strings/string_tokenizer_unittest.cc',
    576         'strings/string_util_unittest.cc',
    577         'strings/stringize_macros_unittest.cc',
    578         'strings/sys_string_conversions_mac_unittest.mm',
    579         'strings/sys_string_conversions_unittest.cc',
    580         'strings/utf_offset_string_conversions_unittest.cc',
    581         'strings/utf_string_conversions_unittest.cc',
    582         'supports_user_data_unittest.cc',
    583         'sync_socket_unittest.cc',
    584         'synchronization/cancellation_flag_unittest.cc',
    585         'synchronization/condition_variable_unittest.cc',
    586         'synchronization/lock_unittest.cc',
    587         'synchronization/waitable_event_unittest.cc',
    588         'synchronization/waitable_event_watcher_unittest.cc',
    589         'sys_info_unittest.cc',
    590         'system_monitor/system_monitor_unittest.cc',
    591         'task/cancelable_task_tracker_unittest.cc',
    592         'task_runner_util_unittest.cc',
    593         'template_util_unittest.cc',
    594         'test/expectations/expectation_unittest.cc',
    595         'test/expectations/parser_unittest.cc',
    596         'test/statistics_delta_reader_unittest.cc',
    597         'test/test_reg_util_win_unittest.cc',
    598         'test/trace_event_analyzer_unittest.cc',
    599         'threading/non_thread_safe_unittest.cc',
    600         'threading/platform_thread_unittest.cc',
    601         'threading/sequenced_worker_pool_unittest.cc',
    602         'threading/simple_thread_unittest.cc',
    603         'threading/thread_checker_unittest.cc',
    604         'threading/thread_collision_warner_unittest.cc',
    605         'threading/thread_id_name_manager_unittest.cc',
    606         'threading/thread_local_storage_unittest.cc',
    607         'threading/thread_local_unittest.cc',
    608         'threading/thread_unittest.cc',
    609         'threading/watchdog_unittest.cc',
    610         'threading/worker_pool_posix_unittest.cc',
    611         'threading/worker_pool_unittest.cc',
    612         'time/pr_time_unittest.cc',
    613         'time/time_unittest.cc',
    614         'time/time_win_unittest.cc',
    615         'timer/hi_res_timer_manager_unittest.cc',
    616         'timer/mock_timer_unittest.cc',
    617         'timer/timer_unittest.cc',
    618         'tools_sanity_unittest.cc',
    619         'tracked_objects_unittest.cc',
    620         'tuple_unittest.cc',
    621         'values_unittest.cc',
    622         'version_unittest.cc',
    623         'vlog_unittest.cc',
    624         'win/dllmain.cc',
    625         'win/enum_variant_unittest.cc',
    626         'win/event_trace_consumer_unittest.cc',
    627         'win/event_trace_controller_unittest.cc',
    628         'win/event_trace_provider_unittest.cc',
    629         'win/i18n_unittest.cc',
    630         'win/iunknown_impl_unittest.cc',
    631         'win/message_window_unittest.cc',
    632         'win/object_watcher_unittest.cc',
    633         'win/pe_image_unittest.cc',
    634         'win/registry_unittest.cc',
    635         'win/scoped_bstr_unittest.cc',
    636         'win/scoped_comptr_unittest.cc',
    637         'win/scoped_process_information_unittest.cc',
    638         'win/scoped_variant_unittest.cc',
    639         'win/shortcut_unittest.cc',
    640         'win/startup_information_unittest.cc',
    641         'win/win_util_unittest.cc',
    642         'win/wrapped_window_proc_unittest.cc',
    643       ],
    644       'dependencies': [
    645         'base',
    646         'base_i18n',
    647         'base_message_loop_tests',
    648         'base_prefs',
    649         'base_prefs_test_support',
    650         'base_static',
    651         'run_all_unittests',
    652         'test_support_base',
    653         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
    654         '../testing/gmock.gyp:gmock',
    655         '../testing/gtest.gyp:gtest',
    656         '../third_party/icu/icu.gyp:icui18n',
    657         '../third_party/icu/icu.gyp:icuuc',
    658       ],
    659       'includes': ['../build/nocompile.gypi'],
    660       'variables': {
    661          # TODO(ajwong): Is there a way to autodetect this?
    662         'module_dir': 'base'
    663       },
    664       'conditions': [
    665         ['OS == "android"', {
    666           'dependencies': [
    667             'android/jni_generator/jni_generator.gyp:jni_generator_tests',
    668             '../testing/android/native_test.gyp:native_test_native_code',
    669           ],
    670         }],
    671         ['OS == "ios" and _toolset != "host"', {
    672           'sources/': [
    673             # Only test the iOS-meaningful portion of process_utils.
    674             ['exclude', '^process/memory_unittest'],
    675             ['exclude', '^process/process_util_unittest\\.cc$'],
    676             ['include', '^process/process_util_unittest_ios\\.cc$'],
    677             # Requires spawning processes.
    678             ['exclude', '^metrics/stats_table_unittest\\.cc$'],
    679             # iOS does not use message_pump_libevent.
    680             ['exclude', '^message_loop/message_pump_libevent_unittest\\.cc$'],
    681           ],
    682           'actions': [
    683             {
    684               'action_name': 'copy_test_data',
    685               'variables': {
    686                 'test_data_files': [
    687                   'test/data',
    688                 ],
    689                 'test_data_prefix': 'base',
    690               },
    691               'includes': [ '../build/copy_test_data_ios.gypi' ],
    692             },
    693           ],
    694         }],
    695         ['desktop_linux == 1 or chromeos == 1', {
    696           'defines': [
    697             'USE_SYMBOLIZE',
    698           ],
    699           'sources!': [
    700             'file_version_info_unittest.cc',
    701           ],
    702           'conditions': [
    703             [ 'desktop_linux==1', {
    704               'sources': [
    705                 'nix/xdg_util_unittest.cc',
    706               ],
    707             }],
    708           ],
    709         }],
    710         ['use_glib == 1', {
    711           'dependencies': [
    712             '../build/linux/system.gyp:glib',
    713           ],
    714         }, {  # use_glib == 0
    715           'sources!': [
    716             'message_loop/message_pump_glib_unittest.cc',
    717           ]
    718         }],
    719         ['use_ozone == 1', {
    720           'sources!': [
    721             'message_loop/message_pump_glib_unittest.cc',
    722           ]
    723         }],
    724         ['OS == "linux" and use_allocator!="none"', {
    725             'dependencies': [
    726               'allocator/allocator.gyp:allocator',
    727             ],
    728           },
    729         ],
    730         ['OS == "win"', {
    731           'sources!': [
    732             'file_descriptor_shuffle_unittest.cc',
    733             'files/dir_reader_posix_unittest.cc',
    734             'threading/worker_pool_posix_unittest.cc',
    735             'message_loop/message_pump_libevent_unittest.cc',
    736           ],
    737           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
    738           'msvs_disabled_warnings': [
    739             4267,
    740           ],
    741           'conditions': [
    742             # This is needed so base_unittests uses the allocator shim, as
    743             # SecurityTest.MemoryAllocationRestriction* tests are dependent
    744             # on tcmalloc.
    745             # TODO(wfh): crbug.com/246278 Move tcmalloc specific tests into
    746             # their own test suite.
    747             ['win_use_allocator_shim==1', {
    748               'dependencies': [
    749                 'allocator/allocator.gyp:allocator',
    750               ],
    751             }],
    752             ['icu_use_data_file_flag==0', {
    753               # This is needed to trigger the dll copy step on windows.
    754               # TODO(mark): This should not be necessary.
    755               'dependencies': [
    756                 '../third_party/icu/icu.gyp:icudata',
    757               ],
    758             }],
    759           ],
    760         }, {  # OS != "win"
    761           'dependencies': [
    762             '../third_party/libevent/libevent.gyp:libevent'
    763           ],
    764         }],
    765       ],  # conditions
    766       'target_conditions': [
    767         ['OS == "ios" and _toolset != "host"', {
    768           'sources/': [
    769             # Pull in specific Mac files for iOS (which have been filtered out
    770             # by file name rules).
    771             ['include', '^mac/bind_objc_block_unittest\\.mm$'],
    772             ['include', '^mac/foundation_util_unittest\\.mm$',],
    773             ['include', '^mac/objc_property_releaser_unittest\\.mm$'],
    774             ['include', '^mac/scoped_nsobject_unittest\\.mm$'],
    775             ['include', '^sys_string_conversions_mac_unittest\\.mm$'],
    776           ],
    777         }],
    778         ['OS == "android" and _toolset == "target"', {
    779           'sources': [
    780             'memory/discardable_memory_ashmem_allocator_unittest.cc',
    781           ],
    782         }],
    783         ['OS == "android"', {
    784           'sources/': [
    785             ['include', '^debug/proc_maps_linux_unittest\\.cc$'],
    786           ],
    787         }],
    788       ],  # target_conditions
    789     },
    790     {
    791       'target_name': 'base_perftests',
    792       'type': '<(gtest_target_type)',
    793       'dependencies': [
    794         'base',
    795         'test_support_base',
    796         '../testing/gtest.gyp:gtest',
    797       ],
    798       'sources': [
    799         'threading/thread_perftest.cc',
    800         'test/run_all_unittests.cc',
    801         '../testing/perf/perf_test.cc'
    802       ],
    803       'conditions': [
    804         ['OS == "android"', {
    805           'dependencies': [
    806             '../testing/android/native_test.gyp:native_test_native_code',
    807           ],
    808         }],
    809       ],
    810     },
    811     {
    812       'target_name': 'base_i18n_perftests',
    813       'type': '<(gtest_target_type)',
    814       'dependencies': [
    815         'test_support_base',
    816         'test_support_perf',
    817         '../testing/gtest.gyp:gtest',
    818         'base_i18n',
    819         'base',
    820       ],
    821       'sources': [
    822         'i18n/streaming_utf8_validator_perftest.cc',
    823       ],
    824     },
    825     {
    826       'target_name': 'test_support_base',
    827       'type': 'static_library',
    828       'dependencies': [
    829         'base',
    830         'base_static',
    831         'base_i18n',
    832         '../testing/gmock.gyp:gmock',
    833         '../testing/gtest.gyp:gtest',
    834         '../third_party/libxml/libxml.gyp:libxml',
    835         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
    836       ],
    837       'export_dependent_settings': [
    838         'base',
    839       ],
    840       'conditions': [
    841         ['os_posix==0', {
    842           'sources!': [
    843             'test/scoped_locale.cc',
    844             'test/scoped_locale.h',
    845           ],
    846         }],
    847         ['os_bsd==1', {
    848           'sources!': [
    849             'test/test_file_util_linux.cc',
    850           ],
    851         }],
    852         ['OS == "android"', {
    853           'dependencies': [
    854             'base_unittests_jni_headers',
    855             'base_java_unittest_support',
    856           ],
    857         }],
    858       ],
    859       'sources': [
    860         'test/expectations/expectation.cc',
    861         'test/expectations/expectation.h',
    862         'test/expectations/parser.cc',
    863         'test/expectations/parser.h',
    864         'test/gtest_xml_util.cc',
    865         'test/gtest_xml_util.h',
    866         'test/launcher/test_launcher.cc',
    867         'test/launcher/test_launcher.h',
    868         'test/launcher/test_result.cc',
    869         'test/launcher/test_result.h',
    870         'test/launcher/test_results_tracker.cc',
    871         'test/launcher/test_results_tracker.h',
    872         'test/launcher/unit_test_launcher.cc',
    873         'test/launcher/unit_test_launcher.h',
    874         'test/launcher/unit_test_launcher_ios.cc',
    875         'test/mock_chrome_application_mac.h',
    876         'test/mock_chrome_application_mac.mm',
    877         'test/mock_devices_changed_observer.cc',
    878         'test/mock_devices_changed_observer.h',
    879         'test/mock_time_provider.cc',
    880         'test/mock_time_provider.h',
    881         'test/multiprocess_test.cc',
    882         'test/multiprocess_test.h',
    883         'test/multiprocess_test_android.cc',
    884         'test/null_task_runner.cc',
    885         'test/null_task_runner.h',
    886         'test/perf_log.cc',
    887         'test/perf_log.h',
    888         'test/perf_test_suite.cc',
    889         'test/perf_test_suite.h',
    890         'test/perf_time_logger.cc',
    891         'test/perf_time_logger.h',
    892         'test/power_monitor_test_base.cc',
    893         'test/power_monitor_test_base.h',
    894         'test/scoped_locale.cc',
    895         'test/scoped_locale.h',
    896         'test/scoped_path_override.cc',
    897         'test/scoped_path_override.h',
    898         'test/sequenced_task_runner_test_template.cc',
    899         'test/sequenced_task_runner_test_template.h',
    900         'test/sequenced_worker_pool_owner.cc',
    901         'test/sequenced_worker_pool_owner.h',
    902         'test/simple_test_clock.cc',
    903         'test/simple_test_clock.h',
    904         'test/simple_test_tick_clock.cc',
    905         'test/simple_test_tick_clock.h',
    906         'test/statistics_delta_reader.cc',
    907         'test/statistics_delta_reader.h',
    908         'test/task_runner_test_template.cc',
    909         'test/task_runner_test_template.h',
    910         'test/test_file_util.cc',
    911         'test/test_file_util.h',
    912         'test/test_file_util_android.cc',
    913         'test/test_file_util_linux.cc',
    914         'test/test_file_util_mac.cc',
    915         'test/test_file_util_posix.cc',
    916         'test/test_file_util_win.cc',
    917         'test/test_listener_ios.h',
    918         'test/test_listener_ios.mm',
    919         'test/test_pending_task.cc',
    920         'test/test_pending_task.h',
    921         'test/test_process_killer_win.cc',
    922         'test/test_process_killer_win.h',
    923         'test/test_reg_util_win.cc',
    924         'test/test_reg_util_win.h',
    925         'test/test_shortcut_win.cc',
    926         'test/test_shortcut_win.h',
    927         'test/test_simple_task_runner.cc',
    928         'test/test_simple_task_runner.h',
    929         'test/test_suite.cc',
    930         'test/test_suite.h',
    931         'test/test_support_android.cc',
    932         'test/test_support_android.h',
    933         'test/test_support_ios.h',
    934         'test/test_support_ios.mm',
    935         'test/test_switches.cc',
    936         'test/test_switches.h',
    937         'test/test_timeouts.cc',
    938         'test/test_timeouts.h',
    939         'test/thread_test_helper.cc',
    940         'test/thread_test_helper.h',
    941         'test/trace_event_analyzer.cc',
    942         'test/trace_event_analyzer.h',
    943         'test/values_test_util.cc',
    944         'test/values_test_util.h',
    945       ],
    946       'target_conditions': [
    947         ['OS == "ios"', {
    948           'sources/': [
    949             # Pull in specific Mac files for iOS (which have been filtered out
    950             # by file name rules).
    951             ['include', '^test/test_file_util_mac\\.cc$'],
    952           ],
    953           'sources!': [
    954             # iOS uses its own unit test launcher.
    955             'test/launcher/unit_test_launcher.cc',
    956           ],
    957         }],
    958       ],  # target_conditions
    959     },
    960     {
    961       'target_name': 'test_support_perf',
    962       'type': 'static_library',
    963       'dependencies': [
    964         'base',
    965         'test_support_base',
    966         '../testing/gtest.gyp:gtest',
    967       ],
    968       'sources': [
    969         'test/run_all_perftests.cc',
    970       ],
    971       'direct_dependent_settings': {
    972         'defines': [
    973           'PERF_TEST',
    974         ],
    975       },
    976     },
    977     {
    978       'target_name': 'sanitizer_options',
    979       'type': 'static_library',
    980       'toolsets': ['host', 'target'],
    981       'variables': {
    982          # Every target is going to depend on sanitizer_options, so allow
    983          # this one to depend on itself.
    984          'prune_self_dependency': 1,
    985          # Do not let 'none' targets depend on this one, they don't need to.
    986          'link_dependency': 1,
    987        },
    988       'sources': [
    989         'debug/sanitizer_options.cc',
    990       ],
    991       'include_dirs': [
    992         '..',
    993       ],
    994       # Some targets may want to opt-out from ASan, TSan and MSan and link
    995       # without the corresponding runtime libraries. We drop the libc++
    996       # dependency and omit the compiler flags to avoid bringing instrumented
    997       # code to those targets.
    998       'conditions': [
    999         ['use_custom_libcxx==1', {
   1000           'dependencies!': [
   1001             '../third_party/libc++/libc++.gyp:libcxx_proxy',
   1002           ],
   1003         }],
   1004         ['tsan==1', {
   1005           'sources': [
   1006             'debug/tsan_suppressions.cc',
   1007           ],
   1008         }],
   1009       ],
   1010       'cflags!': [
   1011         '-fsanitize=address',
   1012         '-fsanitize=thread',
   1013         '-fsanitize=memory',
   1014         '-fsanitize-memory-track-origins',
   1015       ],
   1016       'direct_dependent_settings': {
   1017         'ldflags': [
   1018           '-Wl,-u_sanitizer_options_link_helper',
   1019         ],
   1020       },
   1021     },
   1022   ],
   1023   'conditions': [
   1024     ['OS!="ios"', {
   1025       'targets': [
   1026         {
   1027           'target_name': 'check_example',
   1028           'type': 'executable',
   1029           'sources': [
   1030             'check_example.cc',
   1031           ],
   1032           'dependencies': [
   1033             'base',
   1034           ],
   1035         },
   1036         {
   1037           'target_name': 'build_utf8_validator_tables',
   1038           'type': 'executable',
   1039           'toolsets': ['host'],
   1040           'dependencies': [
   1041             'base',
   1042             '../third_party/icu/icu.gyp:icuuc',
   1043           ],
   1044           'sources': [
   1045             'i18n/build_utf8_validator_tables.cc'
   1046           ],
   1047         },
   1048       ],
   1049     }],
   1050     ['OS == "win" and target_arch=="ia32"', {
   1051       'targets': [
   1052         # The base_win64 target here allows us to use base for Win64 targets
   1053         # (the normal build is 32 bits).
   1054         {
   1055           'target_name': 'base_win64',
   1056           'type': '<(component)',
   1057           'variables': {
   1058             'base_target': 1,
   1059           },
   1060           'dependencies': [
   1061             'base_static_win64',
   1062             'allocator/allocator.gyp:allocator_extension_thunks_win64',
   1063             '../third_party/modp_b64/modp_b64.gyp:modp_b64_win64',
   1064             'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
   1065           ],
   1066           # TODO(gregoryd): direct_dependent_settings should be shared with the
   1067           # 32-bit target, but it doesn't work due to a bug in gyp
   1068           'direct_dependent_settings': {
   1069             'include_dirs': [
   1070               '..',
   1071             ],
   1072           },
   1073           'defines': [
   1074             'BASE_WIN64',
   1075             '<@(nacl_win64_defines)',
   1076           ],
   1077           'configurations': {
   1078             'Common_Base': {
   1079               'msvs_target_platform': 'x64',
   1080             },
   1081           },
   1082           'conditions': [
   1083             ['component == "shared_library"', {
   1084               'sources!': [
   1085                 'debug/debug_on_start_win.cc',
   1086               ],
   1087             }],
   1088           ],
   1089           # Specify delayload for base_win64.dll.
   1090           'msvs_settings': {
   1091             'VCLinkerTool': {
   1092               'DelayLoadDLLs': [
   1093                 'powrprof.dll',
   1094               ],
   1095               'AdditionalDependencies': [
   1096                 'powrprof.lib',
   1097               ],
   1098             },
   1099           },
   1100           # Specify delayload for components that link with base_win64.lib.
   1101           'all_dependent_settings': {
   1102             'msvs_settings': {
   1103               'VCLinkerTool': {
   1104                 'DelayLoadDLLs': [
   1105                   'powrprof.dll',
   1106                 ],
   1107                 'AdditionalDependencies': [
   1108                   'powrprof.lib',
   1109                 ],
   1110               },
   1111             },
   1112           },
   1113           # TODO(rvargas): Bug 78117. Remove this.
   1114           'msvs_disabled_warnings': [
   1115             4244,
   1116             4996,
   1117             4267,
   1118           ],
   1119           'sources': [
   1120             'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
   1121             'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
   1122             'async_socket_io_handler.h',
   1123             'async_socket_io_handler_posix.cc',
   1124             'async_socket_io_handler_win.cc',
   1125             'auto_reset.h',
   1126             'event_recorder.h',
   1127             'event_recorder_stubs.cc',
   1128             'event_recorder_win.cc',
   1129             'linux_util.cc',
   1130             'linux_util.h',
   1131             'md5.cc',
   1132             'md5.h',
   1133             'message_loop/message_pump_observer.h',
   1134             'message_loop/message_pump_libevent.cc',
   1135             'message_loop/message_pump_libevent.h',
   1136             'metrics/field_trial.cc',
   1137             'metrics/field_trial.h',
   1138             'posix/file_descriptor_shuffle.cc',
   1139             'posix/file_descriptor_shuffle.h',
   1140             'sync_socket.h',
   1141             'sync_socket_win.cc',
   1142             'sync_socket_posix.cc',
   1143           ],
   1144         },
   1145         {
   1146           'target_name': 'base_i18n_nacl_win64',
   1147           'type': '<(component)',
   1148           # TODO(gregoryd): direct_dependent_settings should be shared with the
   1149           # 32-bit target, but it doesn't work due to a bug in gyp
   1150           'direct_dependent_settings': {
   1151             'include_dirs': [
   1152               '..',
   1153             ],
   1154           },
   1155           'defines': [
   1156             '<@(nacl_win64_defines)',
   1157             'BASE_I18N_IMPLEMENTATION',
   1158           ],
   1159           'include_dirs': [
   1160             '..',
   1161           ],
   1162           'sources': [
   1163             'i18n/icu_util_nacl_win64.cc',
   1164           ],
   1165           'configurations': {
   1166             'Common_Base': {
   1167               'msvs_target_platform': 'x64',
   1168             },
   1169           },
   1170         },
   1171         {
   1172           # TODO(rvargas): Remove this when gyp finally supports a clean model.
   1173           # See bug 36232.
   1174           'target_name': 'base_static_win64',
   1175           'type': 'static_library',
   1176           'sources': [
   1177             'base_switches.cc',
   1178             'base_switches.h',
   1179             'win/pe_image.cc',
   1180             'win/pe_image.h',
   1181           ],
   1182           'sources!': [
   1183             # base64.cc depends on modp_b64.
   1184             'base64.cc',
   1185           ],
   1186           'include_dirs': [
   1187             '..',
   1188           ],
   1189           'configurations': {
   1190             'Common_Base': {
   1191               'msvs_target_platform': 'x64',
   1192             },
   1193           },
   1194           'defines': [
   1195             '<@(nacl_win64_defines)',
   1196           ],
   1197           # TODO(rvargas): Bug 78117. Remove this.
   1198           'msvs_disabled_warnings': [
   1199             4244,
   1200           ],
   1201         },
   1202       ],
   1203     }],
   1204     ['os_posix==1 and OS!="mac" and OS!="ios"', {
   1205       'targets': [
   1206         {
   1207           'target_name': 'symbolize',
   1208           'type': 'static_library',
   1209           'toolsets': ['host', 'target'],
   1210           'variables': {
   1211             'chromium_code': 0,
   1212           },
   1213           'conditions': [
   1214             ['OS == "solaris"', {
   1215               'include_dirs': [
   1216                 '/usr/gnu/include',
   1217                 '/usr/gnu/include/libelf',
   1218               ],
   1219             },],
   1220           ],
   1221           'cflags': [
   1222             '-Wno-sign-compare',
   1223           ],
   1224           'cflags!': [
   1225             '-Wextra',
   1226           ],
   1227           'defines': [
   1228             'GLOG_BUILD_CONFIG_INCLUDE="build/build_config.h"',
   1229           ],
   1230           'sources': [
   1231             'third_party/symbolize/config.h',
   1232             'third_party/symbolize/demangle.cc',
   1233             'third_party/symbolize/demangle.h',
   1234             'third_party/symbolize/glog/logging.h',
   1235             'third_party/symbolize/glog/raw_logging.h',
   1236             'third_party/symbolize/symbolize.cc',
   1237             'third_party/symbolize/symbolize.h',
   1238             'third_party/symbolize/utilities.h',
   1239           ],
   1240           'include_dirs': [
   1241             '..',
   1242           ],
   1243         },
   1244         {
   1245           'target_name': 'xdg_mime',
   1246           'type': 'static_library',
   1247           'toolsets': ['host', 'target'],
   1248           'variables': {
   1249             'chromium_code': 0,
   1250           },
   1251           'cflags!': [
   1252             '-Wextra',
   1253           ],
   1254           'sources': [
   1255             'third_party/xdg_mime/xdgmime.c',
   1256             'third_party/xdg_mime/xdgmime.h',
   1257             'third_party/xdg_mime/xdgmimealias.c',
   1258             'third_party/xdg_mime/xdgmimealias.h',
   1259             'third_party/xdg_mime/xdgmimecache.c',
   1260             'third_party/xdg_mime/xdgmimecache.h',
   1261             'third_party/xdg_mime/xdgmimeglob.c',
   1262             'third_party/xdg_mime/xdgmimeglob.h',
   1263             'third_party/xdg_mime/xdgmimeicon.c',
   1264             'third_party/xdg_mime/xdgmimeicon.h',
   1265             'third_party/xdg_mime/xdgmimeint.c',
   1266             'third_party/xdg_mime/xdgmimeint.h',
   1267             'third_party/xdg_mime/xdgmimemagic.c',
   1268             'third_party/xdg_mime/xdgmimemagic.h',
   1269             'third_party/xdg_mime/xdgmimeparent.c',
   1270             'third_party/xdg_mime/xdgmimeparent.h',
   1271           ],
   1272         },
   1273       ],
   1274     }],
   1275     ['OS == "android"', {
   1276       'targets': [
   1277         {
   1278           'target_name': 'base_jni_headers',
   1279           'type': 'none',
   1280           'sources': [
   1281             'android/java/src/org/chromium/base/ApplicationStatus.java',
   1282             'android/java/src/org/chromium/base/BuildInfo.java',
   1283             'android/java/src/org/chromium/base/CommandLine.java',
   1284             'android/java/src/org/chromium/base/ContentUriUtils.java',
   1285             'android/java/src/org/chromium/base/CpuFeatures.java',
   1286             'android/java/src/org/chromium/base/EventLog.java',
   1287             'android/java/src/org/chromium/base/ImportantFileWriterAndroid.java',
   1288             'android/java/src/org/chromium/base/JNIUtils.java',
   1289             'android/java/src/org/chromium/base/library_loader/LibraryLoader.java',
   1290             'android/java/src/org/chromium/base/MemoryPressureListener.java',
   1291             'android/java/src/org/chromium/base/JavaHandlerThread.java',
   1292             'android/java/src/org/chromium/base/PathService.java',
   1293             'android/java/src/org/chromium/base/PathUtils.java',
   1294             'android/java/src/org/chromium/base/PowerMonitor.java',
   1295             'android/java/src/org/chromium/base/SystemMessageHandler.java',
   1296             'android/java/src/org/chromium/base/SysUtils.java',
   1297             'android/java/src/org/chromium/base/ThreadUtils.java',
   1298             'android/java/src/org/chromium/base/TraceEvent.java',
   1299           ],
   1300           'variables': {
   1301             'jni_gen_package': 'base',
   1302           },
   1303           'includes': [ '../build/jni_generator.gypi' ],
   1304         },
   1305         {
   1306           'target_name': 'base_unittests_jni_headers',
   1307           'type': 'none',
   1308           'sources': [
   1309             'test/android/java/src/org/chromium/base/ContentUriTestUtils.java',
   1310           ],
   1311           'variables': {
   1312             'jni_gen_package': 'base',
   1313           },
   1314           'includes': [ '../build/jni_generator.gypi' ],
   1315         },
   1316         {
   1317           'target_name': 'base_native_libraries_gen',
   1318           'type': 'none',
   1319           'sources': [
   1320             'android/java/templates/NativeLibraries.template',
   1321           ],
   1322           'variables': {
   1323             'package_name': 'org/chromium/base/library_loader',
   1324             'include_path': 'android/java/templates',
   1325             'template_deps': [
   1326               'android/java/templates/native_libraries_array.h'
   1327             ],
   1328           },
   1329           'includes': [ '../build/android/java_cpp_template.gypi' ],
   1330         },
   1331         {
   1332           'target_name': 'base_java',
   1333           'type': 'none',
   1334           'variables': {
   1335             'java_in_dir': '../base/android/java',
   1336             'jar_excluded_classes': [ '*/NativeLibraries.class' ],
   1337           },
   1338           'dependencies': [
   1339             'base_java_application_state',
   1340             'base_java_memory_pressure_level_list',
   1341             'base_native_libraries_gen',
   1342           ],
   1343           'includes': [ '../build/java.gypi' ],
   1344           'conditions': [
   1345             ['android_webview_build==0', {
   1346               'dependencies': [
   1347                 '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
   1348               ],
   1349             }]
   1350           ],
   1351         },
   1352         {
   1353           'target_name': 'base_java_unittest_support',
   1354           'type': 'none',
   1355           'dependencies': [
   1356             'base_java',
   1357           ],
   1358           'variables': {
   1359             'java_in_dir': '../base/test/android/java',
   1360           },
   1361           'includes': [ '../build/java.gypi' ],
   1362         },
   1363         {
   1364           'target_name': 'base_java_application_state',
   1365           'type': 'none',
   1366           # This target is used to auto-generate ApplicationState.java
   1367           # from a template file. The source file contains a list of
   1368           # Java constant declarations matching the ones in
   1369           # android/application_state_list.h.
   1370           'sources': [
   1371             'android/java/src/org/chromium/base/ApplicationState.template',
   1372           ],
   1373           'variables': {
   1374             'package_name': 'org/chromium/base',
   1375             'template_deps': ['android/application_state_list.h'],
   1376           },
   1377           'includes': [ '../build/android/java_cpp_template.gypi' ],
   1378         },
   1379         {
   1380           'target_name': 'base_java_memory_pressure_level_list',
   1381           'type': 'none',
   1382           'sources': [
   1383             'android/java/src/org/chromium/base/MemoryPressureLevelList.template',
   1384           ],
   1385           'variables': {
   1386             'package_name': 'org/chromium/base',
   1387             'template_deps': ['memory/memory_pressure_level_list.h'],
   1388           },
   1389           'includes': [ '../build/android/java_cpp_template.gypi' ],
   1390         },
   1391         {
   1392           'target_name': 'base_java_test_support',
   1393           'type': 'none',
   1394           'dependencies': [
   1395             'base_java',
   1396           ],
   1397           'variables': {
   1398             'java_in_dir': '../base/test/android/javatests',
   1399           },
   1400           'includes': [ '../build/java.gypi' ],
   1401         },
   1402         {
   1403           'target_name': 'base_javatests',
   1404           'type': 'none',
   1405           'dependencies': [
   1406             'base_java',
   1407             'base_java_test_support',
   1408           ],
   1409           'variables': {
   1410             'java_in_dir': '../base/android/javatests',
   1411           },
   1412           'includes': [ '../build/java.gypi' ],
   1413         },
   1414         {
   1415           'target_name': 'chromium_android_linker',
   1416           'type': 'shared_library',
   1417           'conditions': [
   1418             ['android_webview_build == 0 and target_arch != "x64" and \
   1419                target_arch != "arm64"', {
   1420               # Avoid breaking the webview/64-bit build because they
   1421               # don't have <(android_ndk_root)/crazy_linker.gyp.
   1422               # Note that webview never uses the linker anyway.
   1423               # Note there is no 64-bit support in the linker.
   1424               'sources': [
   1425                 'android/linker/linker_jni.cc',
   1426               ],
   1427               # The crazy linker is never instrumented.
   1428               'cflags!': [
   1429                 '-finstrument-functions',
   1430               ],
   1431               'dependencies': [
   1432                 # The NDK contains the crazy_linker here:
   1433                 #   '<(android_ndk_root)/crazy_linker.gyp:crazy_linker'
   1434                 # However, we use our own fork.  See bug 384700.
   1435                 '../third_party/android_crazy_linker/crazy_linker.gyp:crazy_linker',
   1436               ],
   1437             }],
   1438           ],
   1439         },
   1440 
   1441       ],
   1442     }],
   1443     ['OS == "android"', {
   1444       'targets': [
   1445         {
   1446           'target_name': 'base_perftests_apk',
   1447           'type': 'none',
   1448           'dependencies': [
   1449             'base_perftests',
   1450           ],
   1451           'variables': {
   1452             'test_suite_name': 'base_perftests',
   1453           },
   1454           'includes': [ '../build/apk_test.gypi' ],
   1455         },
   1456       ],
   1457     }],
   1458     ['OS == "win"', {
   1459       'targets': [
   1460         {
   1461           'target_name': 'debug_message',
   1462           'type': 'executable',
   1463           'sources': [
   1464             'debug_message.cc',
   1465           ],
   1466           'msvs_settings': {
   1467             'VCLinkerTool': {
   1468               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
   1469             },
   1470           },
   1471         },
   1472       ],
   1473     }],
   1474     ['OS == "android"', {
   1475       'targets': [
   1476         {
   1477           'target_name': 'base_unittests_apk',
   1478           'type': 'none',
   1479           'dependencies': [
   1480             'base_java',
   1481             'base_unittests',
   1482           ],
   1483           'variables': {
   1484             'test_suite_name': 'base_unittests',
   1485           },
   1486           'includes': [ '../build/apk_test.gypi' ],
   1487         },
   1488       ],
   1489     }],
   1490     ['test_isolation_mode != "noop"', {
   1491       'targets': [
   1492         {
   1493           'target_name': 'base_unittests_run',
   1494           'type': 'none',
   1495           'dependencies': [
   1496             'base_unittests',
   1497           ],
   1498           'includes': [
   1499             '../build/isolate.gypi',
   1500             'base_unittests.isolate',
   1501           ],
   1502           'sources': [
   1503             'base_unittests.isolate',
   1504           ],
   1505         },
   1506       ],
   1507     }],
   1508   ],
   1509 }
   1510