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