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