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