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