Add a stat to the smoothness benchmark for avg number of missing tiles.
[chromium-blink-merge.git] / base / base.gyp
blobf2e3288f5c33d0f469ba1646e906afb94c5c9397
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         ['use_glib==1', {
39           'conditions': [
40             ['chromeos==1', {
41               'sources/': [ ['include', '_chromeos\\.cc$'] ]
42             }],
43             ['linux_use_tcmalloc==0', {
44               'defines': [
45                 'NO_TCMALLOC',
46               ],
47               'direct_dependent_settings': {
48                 'defines': [
49                   'NO_TCMALLOC',
50                 ],
51               },
52             }],
53             ['toolkit_uses_gtk==1', {
54               'dependencies': [
55                 '../build/linux/system.gyp:gtk',
56               ],
57               'export_dependent_settings': [
58                 '../build/linux/system.gyp:gtk',
59               ],
60             }],
61           ],
62           'dependencies': [
63             'symbolize',
64             '../build/linux/system.gyp:glib',
65             '../build/linux/system.gyp:x11',
66             'xdg_mime',
67           ],
68           'defines': [
69             'USE_SYMBOLIZE',
70           ],
71           'cflags': [
72             '-Wno-write-strings',
73           ],
74           'export_dependent_settings': [
75             '../build/linux/system.gyp:glib',
76             '../build/linux/system.gyp:x11',
77           ],
78         }, {  # use_glib!=1
79             'sources/': [
80               ['exclude', '/xdg_user_dirs/'],
81               ['exclude', '_nss\\.cc$'],
82             ],
83         }],
84         ['OS == "android" and _toolset == "host"', {
85           # Base for host support is the minimum required to run the
86           # ssl false start blacklist tool. It requires further changes
87           # to generically support host builds (and tests).
88           # Note: when building for host, gyp has OS == "android",
89           # hence the *_android.cc files are included but the actual code
90           # doesn't have OS_ANDROID / ANDROID defined.
91           'conditions': [
92             # Host build on linux depends on system.gyp::gtk as
93             # default linux build has TOOLKIT_GTK defined.
94             ['host_os == "linux"', {
95               'sources/': [
96                 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
97               ],
98               'dependencies': [
99                 '../build/linux/system.gyp:gtk',
100               ],
101               'export_dependent_settings': [
102                 '../build/linux/system.gyp:gtk',
103               ],
104             }],
105             ['host_os == "mac"', {
106               'sources/': [
107                 ['exclude', '^native_library_linux\\.cc$'],
108                 ['exclude', '^process_util_linux\\.cc$'],
109                 ['exclude', '^sys_info_linux\\.cc$'],
110                 ['exclude', '^sys_string_conversions_linux\\.cc$'],
111                 ['exclude', '^worker_pool_linux\\.cc$'],
112               ],
113             }],
114           ],
115         }],
116         ['OS == "android" and _toolset == "target"', {
117           'conditions': [
118             ['target_arch == "ia32"', {
119               'sources/': [
120                 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
121               ],
122             }],
123           ],
124           'dependencies': [
125             'base_jni_headers',
126             'symbolize',
127             '../third_party/ashmem/ashmem.gyp:ashmem',
128             '../third_party/icu/icu.gyp:icuuc',
129           ],
130           'include_dirs': [
131             '<(SHARED_INTERMEDIATE_DIR)/base',
132           ],
133           'link_settings': {
134             'libraries': [
135               '-llog',
136             ],
137           },
138           'defines': [
139             'USE_SYMBOLIZE',
140           ],
141           'sources!': [
142             'debug/stack_trace_posix.cc',
143           ],
144         }],
145         ['OS == "android" and _toolset == "target" and android_build_type == 0', {
146           'dependencies': [
147             'base_java',
148           ],
149         }],
150         ['os_bsd==1', {
151           'include_dirs': [
152             '/usr/local/include',
153           ],
154           'link_settings': {
155             'libraries': [
156               '-L/usr/local/lib -lexecinfo',
157             ],
158           },
159         }],
160         ['OS == "linux"', {
161           'link_settings': {
162             'libraries': [
163               # We need rt for clock_gettime().
164               '-lrt',
165               # For 'native_library_linux.cc'
166               '-ldl',
167             ],
168           },
169         }],
170         ['OS == "mac"', {
171           'link_settings': {
172             'libraries': [
173               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
174               '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
175               '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
176               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
177               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
178               '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
179               '$(SDKROOT)/System/Library/Frameworks/Security.framework',
180             ],
181           },
182           'dependencies': [
183             '../third_party/mach_override/mach_override.gyp:mach_override',
184           ],
185         }],
186         ['OS == "ios"', {
187           'link_settings': {
188             'libraries': [
189               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
190               '$(SDKROOT)/System/Library/Frameworks/CoreGraphics.framework',
191               '$(SDKROOT)/System/Library/Frameworks/CoreText.framework',
192               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
193               '$(SDKROOT)/System/Library/Frameworks/UIKit.framework',
194             ],
195           },
196         }],
197         ['OS != "win" and OS != "ios"', {
198             'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
199         },],
200         ['component=="shared_library"', {
201           'conditions': [
202             ['OS=="win"', {
203               'sources!': [
204                 'debug/debug_on_start_win.cc',
205               ],
206             }],
207           ],
208         }],
209       ],
210       'sources': [
211         'third_party/nspr/prcpucfg.h',
212         'third_party/nspr/prcpucfg_win.h',
213         'third_party/nspr/prtypes.h',
214         'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
215         'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
216         'auto_reset.h',
217         'event_recorder.h',
218         'event_recorder_stubs.cc',
219         'event_recorder_win.cc',
220         'linux_util.cc',
221         'linux_util.h',
222         'md5.cc',
223         'md5.h',
224         'message_pump_android.cc',
225         'message_pump_android.h',
226         'message_pump_glib.cc',
227         'message_pump_glib.h',
228         'message_pump_gtk.cc',
229         'message_pump_gtk.h',
230         'message_pump_io_ios.cc',
231         'message_pump_io_ios.h',
232         'message_pump_observer.h',
233         'message_pump_aurax11.cc',
234         'message_pump_aurax11.h',
235         'message_pump_libevent.cc',
236         'message_pump_libevent.h',
237         'message_pump_mac.h',
238         'message_pump_mac.mm',
239         'metrics/field_trial.cc',
240         'metrics/field_trial.h',
241         'posix/file_descriptor_shuffle.cc',
242         'posix/file_descriptor_shuffle.h',
243         'sync_socket.h',
244         'sync_socket_win.cc',
245         'sync_socket_posix.cc',
246       ],
247     },
248     {
249       'target_name': 'base_i18n',
250       'type': '<(component)',
251       'variables': {
252         'enable_wexit_time_destructors': 1,
253         'optimize': 'max',
254       },
255       'dependencies': [
256         'base',
257         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
258         '../third_party/icu/icu.gyp:icui18n',
259         '../third_party/icu/icu.gyp:icuuc',
260       ],
261       'conditions': [
262         ['toolkit_uses_gtk==1', {
263           'dependencies': [
264             # i18n/rtl.cc uses gtk
265             '../build/linux/system.gyp:gtk',
266           ],
267         }],
268       ],
269       'export_dependent_settings': [
270         'base',
271       ],
272       'defines': [
273         'BASE_I18N_IMPLEMENTATION',
274       ],
275       'sources': [
276         'i18n/base_i18n_export.h',
277         'i18n/bidi_line_iterator.cc',
278         'i18n/bidi_line_iterator.h',
279         'i18n/break_iterator.cc',
280         'i18n/break_iterator.h',
281         'i18n/char_iterator.cc',
282         'i18n/char_iterator.h',
283         'i18n/case_conversion.cc',
284         'i18n/case_conversion.h',
285         'i18n/file_util_icu.cc',
286         'i18n/file_util_icu.h',
287         'i18n/icu_encoding_detection.cc',
288         'i18n/icu_encoding_detection.h',
289         'i18n/icu_string_conversions.cc',
290         'i18n/icu_string_conversions.h',
291         'i18n/icu_util.cc',
292         'i18n/icu_util.h',
293         'i18n/number_formatting.cc',
294         'i18n/number_formatting.h',
295         'i18n/rtl.cc',
296         'i18n/rtl.h',
297         'i18n/string_search.cc',
298         'i18n/string_search.h',
299         'i18n/time_formatting.cc',
300         'i18n/time_formatting.h',
301       ],
302     },
303     {
304       'target_name': 'base_prefs',
305       'type': '<(component)',
306       'variables': {
307         'enable_wexit_time_destructors': 1,
308         'optimize': 'max',
309       },
310       'dependencies': [
311         'base',
312       ],
313       'export_dependent_settings': [
314         'base',
315       ],
316       'defines': [
317         'BASE_PREFS_IMPLEMENTATION',
318       ],
319       'sources': [
320         'prefs/default_pref_store.cc',
321         'prefs/default_pref_store.h',
322         'prefs/json_pref_store.cc',
323         'prefs/json_pref_store.h',
324         'prefs/overlay_user_pref_store.cc',
325         'prefs/overlay_user_pref_store.h',
326         'prefs/persistent_pref_store.h',
327         'prefs/pref_notifier.h',
328         'prefs/pref_store.cc',
329         'prefs/pref_store.h',
330         'prefs/pref_value_map.cc',
331         'prefs/pref_value_map.h',
332         'prefs/public/pref_change_registrar.cc',
333         'prefs/public/pref_change_registrar.h',
334         'prefs/public/pref_observer.h',
335         'prefs/public/pref_service_base.h',
336         'prefs/value_map_pref_store.cc',
337         'prefs/value_map_pref_store.h',
338       ],
339     },
340     {
341       # This is the subset of files from base that should not be used with a
342       # dynamic library. Note that this library cannot depend on base because
343       # base depends on base_static.
344       'target_name': 'base_static',
345       'type': 'static_library',
346       'variables': {
347         'enable_wexit_time_destructors': 1,
348         'optimize': 'max',
349       },
350       'toolsets': ['host', 'target'],
351       'sources': [
352         'base_switches.cc',
353         'base_switches.h',
354         'win/pe_image.cc',
355         'win/pe_image.h',
356       ],
357       'include_dirs': [
358         '..',
359       ],
360     },
361     {
362       # TODO(rvargas): Remove this when gyp finally supports a clean model.
363       # See bug 36232.
364       'target_name': 'base_static_win64',
365       'type': 'static_library',
366       'sources': [
367         'base_switches.cc',
368         'base_switches.h',
369         'win/pe_image.cc',
370         'win/pe_image.h',
371       ],
372       'sources!': [
373         # base64.cc depends on modp_b64.
374         'base64.cc',
375       ],
376       'include_dirs': [
377         '..',
378       ],
379       'configurations': {
380         'Common_Base': {
381           'msvs_target_platform': 'x64',
382         },
383       },
384       'defines': [
385         'NACL_WIN64',
386       ],
387       # TODO(rvargas): Bug 78117. Remove this.
388       'msvs_disabled_warnings': [
389         4244,
390       ],
391     },
392     # Include this target for a main() function that simply instantiates
393     # and runs a base::TestSuite.
394     {
395       'target_name': 'run_all_unittests',
396       'type': 'static_library',
397       'dependencies': [
398         'test_support_base',
399       ],
400       'sources': [
401         'test/run_all_unittests.cc',
402       ],
403     },
404     {
405       'target_name': 'base_unittests',
406       'type': '<(gtest_target_type)',
407       'sources': [
408         # Tests.
409         'android/jni_android_unittest.cc',
410         'android/jni_array_unittest.cc',
411         'android/path_utils_unittest.cc',
412         'android/scoped_java_ref_unittest.cc',
413         'at_exit_unittest.cc',
414         'atomicops_unittest.cc',
415         'base64_unittest.cc',
416         'bind_helpers_unittest.cc',
417         'bind_unittest.cc',
418         'bind_unittest.nc',
419         'bits_unittest.cc',
420         'build_time_unittest.cc',
421         'callback_unittest.cc',
422         'callback_unittest.nc',
423         'cancelable_callback_unittest.cc',
424         'command_line_unittest.cc',
425         'containers/linked_list_unittest.cc',
426         'containers/mru_cache_unittest.cc',
427         'containers/small_map_unittest.cc',
428         'containers/stack_container_unittest.cc',
429         'cpu_unittest.cc',
430         'debug/leak_tracker_unittest.cc',
431         'debug/stack_trace_unittest.cc',
432         'debug/trace_event_unittest.cc',
433         'debug/trace_event_unittest.h',
434         'debug/trace_event_win_unittest.cc',
435         'environment_unittest.cc',
436         'file_path_unittest.cc',
437         'file_util_proxy_unittest.cc',
438         'file_util_unittest.cc',
439         'file_version_info_unittest.cc',
440         'files/dir_reader_posix_unittest.cc',
441         'files/important_file_writer_unittest.cc',
442         'files/scoped_temp_dir_unittest.cc',
443         'gmock_unittest.cc',
444         'guid_unittest.cc',
445         'hi_res_timer_manager_unittest.cc',
446         'id_map_unittest.cc',
447         'i18n/break_iterator_unittest.cc',
448         'i18n/char_iterator_unittest.cc',
449         'i18n/case_conversion_unittest.cc',
450         'i18n/file_util_icu_unittest.cc',
451         'i18n/icu_string_conversions_unittest.cc',
452         'i18n/number_formatting_unittest.cc',
453         'i18n/rtl_unittest.cc',
454         'i18n/string_search_unittest.cc',
455         'i18n/time_formatting_unittest.cc',
456         'ios/device_util_unittest.mm',
457         'json/json_parser_unittest.cc',
458         'json/json_reader_unittest.cc',
459         'json/json_value_converter_unittest.cc',
460         'json/json_value_serializer_unittest.cc',
461         'json/json_writer_unittest.cc',
462         'json/string_escape_unittest.cc',
463         'lazy_instance_unittest.cc',
464         'logging_unittest.cc',
465         'mac/bind_objc_block_unittest.mm',
466         'mac/foundation_util_unittest.mm',
467         'mac/libdispatch_task_runner_unittest.cc',
468         'mac/mac_util_unittest.mm',
469         'mac/objc_property_releaser_unittest.mm',
470         'mac/scoped_sending_event_unittest.mm',
471         'md5_unittest.cc',
472         'memory/aligned_memory_unittest.cc',
473         'memory/linked_ptr_unittest.cc',
474         'memory/ref_counted_memory_unittest.cc',
475         'memory/ref_counted_unittest.cc',
476         'memory/scoped_nsobject_unittest.mm',
477         'memory/scoped_ptr_unittest.cc',
478         'memory/scoped_ptr_unittest.nc',
479         'memory/scoped_vector_unittest.cc',
480         'memory/singleton_unittest.cc',
481         'memory/weak_ptr_unittest.cc',
482         'memory/weak_ptr_unittest.nc',
483         'message_loop_proxy_impl_unittest.cc',
484         'message_loop_proxy_unittest.cc',
485         'message_loop_unittest.cc',
486         'message_pump_glib_unittest.cc',
487         'message_pump_io_ios_unittest.cc',
488         'message_pump_libevent_unittest.cc',
489         'metrics/sample_map_unittest.cc',
490         'metrics/sample_vector_unittest.cc',
491         'metrics/bucket_ranges_unittest.cc',
492         'metrics/field_trial_unittest.cc',
493         'metrics/histogram_unittest.cc',
494         'metrics/sparse_histogram_unittest.cc',
495         'metrics/stats_table_unittest.cc',
496         'metrics/statistics_recorder_unittest.cc',
497         'observer_list_unittest.cc',
498         'os_compat_android_unittest.cc',
499         'path_service_unittest.cc',
500         'pickle_unittest.cc',
501         'platform_file_unittest.cc',
502         'posix/file_descriptor_shuffle_unittest.cc',
503         'pr_time_unittest.cc',
504         'process_util_unittest.cc',
505         'process_util_unittest_ios.cc',
506         'process_util_unittest_mac.h',
507         'process_util_unittest_mac.mm',
508         'profiler/tracked_time_unittest.cc',
509         'rand_util_unittest.cc',
510         'scoped_native_library_unittest.cc',
511         'scoped_observer.h',
512         'sha1_unittest.cc',
513         'shared_memory_unittest.cc',
514         'stl_util_unittest.cc',
515         'string16_unittest.cc',
516         'string_number_conversions_unittest.cc',
517         'string_piece_unittest.cc',
518         'string_split_unittest.cc',
519         'string_tokenizer_unittest.cc',
520         'string_util_unittest.cc',
521         'stringize_macros_unittest.cc',
522         'stringprintf_unittest.cc',
523         'synchronization/cancellation_flag_unittest.cc',
524         'synchronization/condition_variable_unittest.cc',
525         'synchronization/lock_unittest.cc',
526         'synchronization/waitable_event_unittest.cc',
527         'synchronization/waitable_event_watcher_unittest.cc',
528         'sys_info_unittest.cc',
529         'sys_string_conversions_mac_unittest.mm',
530         'sys_string_conversions_unittest.cc',
531         'system_monitor/system_monitor_unittest.cc',
532         'task_runner_util_unittest.cc',
533         'template_util_unittest.cc',
534         'test/sequenced_worker_pool_owner.cc',
535         'test/sequenced_worker_pool_owner.h',
536         'test/trace_event_analyzer_unittest.cc',
537         'threading/non_thread_safe_unittest.cc',
538         'threading/platform_thread_unittest.cc',
539         'threading/sequenced_worker_pool_unittest.cc',
540         'threading/simple_thread_unittest.cc',
541         'threading/thread_checker_unittest.cc',
542         'threading/thread_collision_warner_unittest.cc',
543         'threading/thread_local_storage_unittest.cc',
544         'threading/thread_local_unittest.cc',
545         'threading/thread_unittest.cc',
546         'threading/watchdog_unittest.cc',
547         'threading/worker_pool_posix_unittest.cc',
548         'threading/worker_pool_unittest.cc',
549         'time_unittest.cc',
550         'time_win_unittest.cc',
551         'timer_unittest.cc',
552         'tools_sanity_unittest.cc',
553         'tracked_objects_unittest.cc',
554         'tuple_unittest.cc',
555         'utf_offset_string_conversions_unittest.cc',
556         'utf_string_conversions_unittest.cc',
557         'values_unittest.cc',
558         'version_unittest.cc',
559         'vlog_unittest.cc',
560         'win/dllmain.cc',
561         'win/enum_variant_unittest.cc',
562         'win/event_trace_consumer_unittest.cc',
563         'win/event_trace_controller_unittest.cc',
564         'win/event_trace_provider_unittest.cc',
565         'win/i18n_unittest.cc',
566         'win/iunknown_impl_unittest.cc',
567         'win/object_watcher_unittest.cc',
568         'win/pe_image_unittest.cc',
569         'win/registry_unittest.cc',
570         'win/sampling_profiler_unittest.cc',
571         'win/scoped_bstr_unittest.cc',
572         'win/scoped_comptr_unittest.cc',
573         'win/scoped_process_information_unittest.cc',
574         'win/shortcut_unittest.cc',
575         'win/startup_information_unittest.cc',
576         'win/scoped_variant_unittest.cc',
577         'win/win_util_unittest.cc',
578         'win/wrapped_window_proc_unittest.cc',
579       ],
580       'dependencies': [
581         'base',
582         'base_i18n',
583         'base_static',
584         'run_all_unittests',
585         'test_support_base',
586         'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
587         '../testing/gmock.gyp:gmock',
588         '../testing/gtest.gyp:gtest',
589         '../third_party/icu/icu.gyp:icui18n',
590         '../third_party/icu/icu.gyp:icuuc',
591       ],
592       'includes': ['../build/nocompile.gypi'],
593       'variables': {
594          # TODO(ajwong): Is there a way to autodetect this?
595         'module_dir': 'base'
596       },
597       'conditions': [
598         ['OS == "android"', {
599           'dependencies': [
600             'android/jni_generator/jni_generator.gyp:jni_generator_tests',
601           ],
602           'conditions': [
603             ['gtest_target_type == "shared_library"', {
604               'dependencies': [
605                 '../testing/android/native_test.gyp:native_test_native_code',
606               ],
607             }],
608           ],
609           'sources!': [
610             # Broken on Android, and already disabled there.
611             'debug/stack_trace_unittest.cc',
612           ],
613         }],
614         ['OS == "ios"', {
615           'sources/': [
616             # Only test the iOS-meaningful portion of process_utils.
617             ['exclude', '^process_util_unittest'],
618             ['include', '^process_util_unittest_ios\\.cc$'],
619             # Requires spawning processes.
620             ['exclude', '^metrics/stats_table_unittest\\.cc$'],
621             # iOS does not use message_pump_libevent.
622             ['exclude', '^message_pump_libevent_unittest\\.cc$'],
623           ],
624           'conditions': [
625             ['coverage != 0', {
626               'sources!': [
627                 # These sources can't be built with coverage due to a toolchain
628                 # bug: http://openradar.appspot.com/radar?id=1499403
629                 'json/json_reader_unittest.cc',
630                 'string_piece_unittest.cc',
632                 # These tests crash when run with coverage turned on due to an
633                 # issue with llvm_gcda_increment_indirect_counter:
634                 # http://crbug.com/156058
635                 'debug/trace_event_unittest.cc',
636                 'debug/trace_event_unittest.h',
637                 'logging_unittest.cc',
638                 'string_util_unittest.cc',
639                 'test/trace_event_analyzer_unittest.cc',
640                 'utf_offset_string_conversions_unittest.cc',
641               ],
642             }],
643           ],
644           'actions': [
645             {
646               'action_name': 'copy_test_data',
647               'variables': {
648                 'test_data_files': [
649                   'data/json/bom_feff.json',
650                   'data/file_util_unittest',
651                 ],
652                 'test_data_prefix': 'base',
653               },
654               'includes': [ '../build/copy_test_data_ios.gypi' ],
655             },
656           ],
657         }],
658         ['use_glib==1', {
659           'sources!': [
660             'file_version_info_unittest.cc',
661           ],
662           'conditions': [
663             [ 'linux_use_tcmalloc==1', {
664                 'dependencies': [
665                   'allocator/allocator.gyp:allocator',
666                 ],
667               },
668             ],
669             [ 'toolkit_uses_gtk==1', {
670               'sources': [
671                 'nix/xdg_util_unittest.cc',
672               ],
673               'dependencies': [
674                 '../build/linux/system.gyp:gtk',
675               ]
676             }],
677           ],
678           'dependencies': [
679             '../build/linux/system.gyp:glib',
680             '../build/linux/system.gyp:ssl',
681             '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
682           ],
683         }, {  # use_glib!=1
684           'sources!': [
685             'message_pump_glib_unittest.cc',
686           ]
687         }],
688         # This is needed to trigger the dll copy step on windows.
689         # TODO(mark): This should not be necessary.
690         ['OS == "win"', {
691           'dependencies': [
692             '../third_party/icu/icu.gyp:icudata',
693           ],
694           'sources!': [
695             'file_descriptor_shuffle_unittest.cc',
696             'files/dir_reader_posix_unittest.cc',
697             'threading/worker_pool_posix_unittest.cc',
698             'message_pump_libevent_unittest.cc',
699           ],
700         }, {  # OS != "win"
701           'dependencies': [
702             '../third_party/libevent/libevent.gyp:libevent'
703           ],
704           'sources/': [
705             ['exclude', '^win/'],
706           ],
707           'sources!': [
708             'debug/trace_event_win_unittest.cc',
709             'time_win_unittest.cc',
710             'win/win_util_unittest.cc',
711           ],
712         }],
713       ],  # conditions
714       'target_conditions': [
715         ['OS == "ios"', {
716           'sources/': [
717             # Pull in specific Mac files for iOS (which have been filtered out
718             # by file name rules).
719             ['include', '^mac/objc_property_releaser_unittest\\.mm$'],
720             ['include', '^mac/bind_objc_block_unittest\\.mm$'],
721             ['include', '^sys_string_conversions_mac_unittest\\.mm$'],
722           ],
723         }],
724       ],  # target_conditions
725     },
726     {
727       'target_name': 'test_support_base',
728       'type': 'static_library',
729       'dependencies': [
730         'base',
731         'base_static',
732         'base_i18n',
733         '../testing/gmock.gyp:gmock',
734         '../testing/gtest.gyp:gtest',
735       ],
736       'export_dependent_settings': [
737         'base',
738       ],
739       'conditions': [
740         ['toolkit_uses_gtk==1', {
741           'dependencies': [
742             # test_suite initializes GTK.
743             '../build/linux/system.gyp:gtk',
744           ],
745         }],
746         ['os_posix==0', {
747           'sources!': [
748             'test/scoped_locale.cc',
749             'test/scoped_locale.h',
750           ],
751         }],
752         ['os_bsd==1', {
753           'sources!': [
754             'test/test_file_util_linux.cc',
755           ],
756         }],
757         ['OS=="win"', {
758           'direct_dependent_settings': {
759             'msvs_settings': {
760               'VCLinkerTool': {
761                 'DelayLoadDLLs': [
762                   'propsys.dll',
763                 ],
764               },
765             },
766           },
767         }],
768       ],
769       'sources': [
770         'perftimer.cc',
771         'test/main_hook.cc',
772         'test/main_hook.h',
773         'test/main_hook_ios.mm',
774         'test/mock_chrome_application_mac.h',
775         'test/mock_chrome_application_mac.mm',
776         'test/mock_devices_changed_observer.cc',
777         'test/mock_devices_changed_observer.h',
778         'test/mock_time_provider.cc',
779         'test/mock_time_provider.h',
780         'test/multiprocess_test.cc',
781         'test/multiprocess_test.h',
782         'test/multiprocess_test_android.cc',
783         'test/perf_test_suite.cc',
784         'test/perf_test_suite.h',
785         'test/scoped_locale.cc',
786         'test/scoped_locale.h',
787         'test/scoped_path_override.cc',
788         'test/scoped_path_override.h',
789         'test/sequenced_task_runner_test_template.cc',
790         'test/sequenced_task_runner_test_template.h',
791         'test/task_runner_test_template.cc',
792         'test/task_runner_test_template.h',
793         'test/test_file_util.h',
794         'test/test_file_util_linux.cc',
795         'test/test_file_util_mac.cc',
796         'test/test_file_util_posix.cc',
797         'test/test_file_util_win.cc',
798         'test/test_listener_ios.h',
799         'test/test_listener_ios.mm',
800         'test/test_reg_util_win.cc',
801         'test/test_reg_util_win.h',
802         'test/test_shortcut_win.cc',
803         'test/test_shortcut_win.h',
804         'test/test_suite.cc',
805         'test/test_suite.h',
806         'test/test_support_android.cc',
807         'test/test_support_android.h',
808         'test/test_support_ios.h',
809         'test/test_support_ios.mm',
810         'test/test_switches.cc',
811         'test/test_switches.h',
812         'test/test_timeouts.cc',
813         'test/test_timeouts.h',
814         'test/thread_test_helper.cc',
815         'test/thread_test_helper.h',
816         'test/trace_event_analyzer.cc',
817         'test/trace_event_analyzer.h',
818         'test/values_test_util.cc',
819         'test/values_test_util.h',
820       ],
821       'target_conditions': [
822         ['OS == "ios"', {
823           'sources/': [
824             # Pull in specific Mac files for iOS (which have been filtered out
825             # by file name rules).
826             ['include', '^test/test_file_util_mac\\.cc$'],
827           ],
828         }],
829       ],  # target_conditions
830     },
831     {
832       'target_name': 'test_support_perf',
833       'type': 'static_library',
834       'dependencies': [
835         'base',
836         '../testing/gtest.gyp:gtest',
837       ],
838       'sources': [
839         'perftimer.cc',
840         'test/run_all_perftests.cc',
841       ],
842       'direct_dependent_settings': {
843         'defines': [
844           'PERF_TEST',
845         ],
846       },
847       'conditions': [
848         ['toolkit_uses_gtk==1', {
849           'dependencies': [
850             # Needed to handle the #include chain:
851             #   base/test/perf_test_suite.h
852             #   base/test/test_suite.h
853             #   gtk/gtk.h
854             '../build/linux/system.gyp:gtk',
855           ],
856         }],
857       ],
858     },
859   ],
860   'conditions': [
861     ['OS!="ios"', {
862       'targets': [
863         {
864           'target_name': 'check_example',
865           'type': 'executable',
866           'sources': [
867             'check_example.cc',
868           ],
869           'dependencies': [
870             'base',
871           ],
872         },
873       ],
874     }],
875     ['OS == "win"', {
876       'targets': [
877         {
878           'target_name': 'base_nacl_win64',
879           'type': '<(component)',
880           'variables': {
881             'base_target': 1,
882           },
883           'dependencies': [
884             'base_static_win64',
885             'allocator/allocator.gyp:allocator_extension_thunks_win64',
886             'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
887           ],
888           # TODO(gregoryd): direct_dependent_settings should be shared with the
889           # 32-bit target, but it doesn't work due to a bug in gyp
890           'direct_dependent_settings': {
891             'include_dirs': [
892               '..',
893             ],
894           },
895           'defines': [
896             '<@(nacl_win64_defines)',
897           ],
898           'sources!': [
899             # base64.cc depends on modp_b64.
900             'base64.cc',
901           ],
902           'configurations': {
903             'Common_Base': {
904               'msvs_target_platform': 'x64',
905             },
906           },
907           'conditions': [
908             ['component == "shared_library"', {
909               'sources!': [
910                 'debug/debug_on_start_win.cc',
911               ],
912             }],
913           ],
914         },
915         {
916           'target_name': 'base_i18n_nacl_win64',
917           'type': '<(component)',
918           # TODO(gregoryd): direct_dependent_settings should be shared with the
919           # 32-bit target, but it doesn't work due to a bug in gyp
920           'direct_dependent_settings': {
921             'include_dirs': [
922               '..',
923             ],
924           },
925           'defines': [
926             '<@(nacl_win64_defines)',
927             'BASE_I18N_IMPLEMENTATION',
928           ],
929           'include_dirs': [
930             '..',
931           ],
932           'sources': [
933             'i18n/icu_util_nacl_win64.cc',
934           ],
935           'configurations': {
936             'Common_Base': {
937               'msvs_target_platform': 'x64',
938             },
939           },
940         },
941       ],
942     }],
943     ['os_posix==1 and OS!="mac" and OS!="ios"', {
944       'targets': [
945         {
946           'target_name': 'symbolize',
947           'type': 'static_library',
948           'toolsets': ['host', 'target'],
949           'variables': {
950             'chromium_code': 0,
951           },
952           'conditions': [
953             ['OS == "solaris"', {
954               'include_dirs': [
955                 '/usr/gnu/include',
956                 '/usr/gnu/include/libelf',
957               ],
958             },],
959           ],
960           'cflags': [
961             '-Wno-sign-compare',
962           ],
963           'cflags!': [
964             '-Wextra',
965           ],
966           'sources': [
967             'third_party/symbolize/config.h',
968             'third_party/symbolize/demangle.cc',
969             'third_party/symbolize/demangle.h',
970             'third_party/symbolize/glog/logging.h',
971             'third_party/symbolize/glog/raw_logging.h',
972             'third_party/symbolize/symbolize.cc',
973             'third_party/symbolize/symbolize.h',
974             'third_party/symbolize/utilities.h',
975           ],
976           'include_dirs': [
977             '..',
978           ],
979         },
980         {
981           'target_name': 'xdg_mime',
982           'type': 'static_library',
983           'toolsets': ['host', 'target'],
984           'variables': {
985             'chromium_code': 0,
986           },
987           'cflags!': [
988             '-Wextra',
989           ],
990           'sources': [
991             'third_party/xdg_mime/xdgmime.c',
992             'third_party/xdg_mime/xdgmime.h',
993             'third_party/xdg_mime/xdgmimealias.c',
994             'third_party/xdg_mime/xdgmimealias.h',
995             'third_party/xdg_mime/xdgmimecache.c',
996             'third_party/xdg_mime/xdgmimecache.h',
997             'third_party/xdg_mime/xdgmimeglob.c',
998             'third_party/xdg_mime/xdgmimeglob.h',
999             'third_party/xdg_mime/xdgmimeicon.c',
1000             'third_party/xdg_mime/xdgmimeicon.h',
1001             'third_party/xdg_mime/xdgmimeint.c',
1002             'third_party/xdg_mime/xdgmimeint.h',
1003             'third_party/xdg_mime/xdgmimemagic.c',
1004             'third_party/xdg_mime/xdgmimemagic.h',
1005             'third_party/xdg_mime/xdgmimeparent.c',
1006             'third_party/xdg_mime/xdgmimeparent.h',
1007           ],
1008         },
1009       ],
1010     }],
1011     ['OS == "android"', {
1012       'targets': [
1013         {
1014           'target_name': 'base_jni_headers',
1015           'type': 'none',
1016           'sources': [
1017             'android/java/src/org/chromium/base/BuildInfo.java',
1018             'android/java/src/org/chromium/base/LocaleUtils.java',
1019             'android/java/src/org/chromium/base/PathService.java',
1020             'android/java/src/org/chromium/base/PathUtils.java',
1021             'android/java/src/org/chromium/base/SystemMessageHandler.java',
1022             'android/java/src/org/chromium/base/SystemMonitor.java',
1023           ],
1024           'variables': {
1025             'jni_gen_dir': 'base',
1026           },
1027           'includes': [ '../build/jni_generator.gypi' ],
1028         },
1029         {
1030           'target_name': 'base_java',
1031           'type': 'none',
1032           'variables': {
1033             'package_name': 'base',
1034             'java_in_dir': '../base/android/java',
1035           },
1036           'includes': [ '../build/java.gypi' ],
1037         },
1038         {
1039           'target_name': 'base_java_test_support',
1040           'type': 'none',
1041           'dependencies': [
1042             'base_java',
1043           ],
1044           'variables': {
1045             'package_name': 'base_javatests',
1046             'java_in_dir': '../base/test/android/javatests',
1047           },
1048           'includes': [ '../build/java.gypi' ],
1049         },
1050       ],
1051     }],
1052     ['OS == "win"', {
1053       'targets': [
1054         {
1055           'target_name': 'debug_message',
1056           'type': 'executable',
1057           'sources': [
1058             'debug_message.cc',
1059           ],
1060           'msvs_settings': {
1061             'VCLinkerTool': {
1062               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
1063             },
1064           },
1065         },
1066       ],
1067     }],
1068     # Special target to wrap a gtest_target_type == shared_library
1069     # base_unittests into an android apk for execution.
1070     # TODO(jrg): lib.target comes from _InstallableTargetInstallPath()
1071     # in the gyp make generator.  What is the correct way to extract
1072     # this path from gyp and into 'raw' for input to antfiles?
1073     # Hard-coding in the gypfile seems a poor choice.
1074     ['OS == "android" and gtest_target_type == "shared_library"', {
1075       'targets': [
1076         {
1077           'target_name': 'base_unittests_apk',
1078           'type': 'none',
1079           'dependencies': [
1080             'base_java',
1081             'base_unittests',
1082           ],
1083           'variables': {
1084             'test_suite_name': 'base_unittests',
1085             'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)base_unittests<(SHARED_LIB_SUFFIX)',
1086           },
1087           'includes': [ '../build/apk_test.gypi' ],
1088         },
1089       ],
1090     }],
1091     ['test_isolation_mode != "noop"', {
1092       'targets': [
1093         {
1094           'target_name': 'base_unittests_run',
1095           'type': 'none',
1096           'dependencies': [
1097             'base_unittests',
1098           ],
1099           'includes': [
1100             '../build/isolate.gypi',
1101             'base_unittests.isolate',
1102           ],
1103           'sources': [
1104             'base_unittests.isolate',
1105           ],
1106         },
1107       ],
1108     }],
1109   ],