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