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