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.
10 'target_conditions': [
11 # This part is shared between the targets defined below.
14 '../build/build_config.h',
15 'third_party/dmg_fp/dmg_fp.h',
16 'third_party/dmg_fp/g_fmt.cc',
17 'third_party/dmg_fp/dtoa_wrapper.cc',
18 'third_party/icu/icu_utf.cc',
19 'third_party/icu/icu_utf.h',
20 'third_party/nspr/prtime.cc',
21 'third_party/nspr/prtime.h',
22 'third_party/nspr/prcpucfg_linux.h',
23 'third_party/xdg_mime/xdgmime.h',
24 'allocator/allocator_extension.cc',
25 'allocator/allocator_extension.h',
26 'android/base_jni_registrar.cc',
27 'android/base_jni_registrar.h',
28 'android/build_info.cc',
29 'android/build_info.h',
30 'android/scoped_java_ref.cc',
31 'android/scoped_java_ref.h',
32 'android/jni_android.cc',
33 'android/jni_android.h',
34 'android/jni_array.cc',
35 'android/jni_array.h',
36 'android/jni_helper.cc',
37 'android/jni_helper.h',
38 'android/jni_registrar.cc',
39 'android/jni_registrar.h',
40 'android/jni_string.cc',
41 'android/jni_string.h',
42 'android/locale_utils.cc',
43 'android/locale_utils.h',
44 'android/path_utils.cc',
45 'android/path_utils.h',
49 'atomic_sequence_num.h',
51 'atomicops_internals_x86_gcc.cc',
52 'atomicops_internals_x86_gcc.h',
53 'atomicops_internals_x86_msvc.h',
57 'base_paths_android.cc',
58 'base_paths_android.h',
61 'base_paths_posix.cc',
70 'bind_internal_win.h',
76 'callback_internal.cc',
77 'callback_internal.h',
78 'cancelable_callback.h',
79 'chromeos/chromeos_version.cc',
80 'chromeos/chromeos_version.h',
83 'compiler_specific.h',
88 'debug/debug_on_start_win.cc',
89 'debug/debug_on_start_win.h',
92 'debug/debugger_posix.cc',
93 'debug/debugger_win.cc',
94 'debug/leak_annotations.h',
95 'debug/leak_tracker.h',
98 'debug/stack_trace.cc',
99 'debug/stack_trace.h',
100 'debug/stack_trace_android.cc',
101 'debug/stack_trace_posix.cc',
102 'debug/stack_trace_win.cc',
103 'debug/trace_event.cc',
104 'debug/trace_event.h',
105 'debug/trace_event_impl.cc',
106 'debug/trace_event_impl.h',
107 'debug/trace_event_win.cc',
108 'dir_reader_fallback.h',
109 'dir_reader_linux.h',
110 'dir_reader_posix.h',
114 'file_descriptor_posix.h',
119 'file_util_android.cc',
120 'file_util_linux.cc',
122 'file_util_posix.cc',
124 'file_util_proxy.cc',
126 'file_version_info.h',
127 'file_version_info_mac.h',
128 'file_version_info_mac.mm',
129 'file_version_info_win.cc',
130 'file_version_info_win.h',
131 'files/file_path_watcher.cc',
132 'files/file_path_watcher.h',
133 'files/file_path_watcher_kqueue.cc',
134 'files/file_path_watcher_linux.cc',
135 'files/file_path_watcher_stub.cc',
136 'files/file_path_watcher_win.cc',
139 'global_descriptors_posix.cc',
140 'global_descriptors_posix.h',
144 'json/json_file_value_serializer.cc',
145 'json/json_file_value_serializer.h',
146 'json/json_parser.cc',
147 'json/json_parser.h',
148 'json/json_reader.cc',
149 'json/json_reader.h',
150 'json/json_string_value_serializer.cc',
151 'json/json_string_value_serializer.h',
152 'json/json_value_converter.h',
153 'json/json_writer.cc',
154 'json/json_writer.h',
155 'json/string_escape.cc',
156 'json/string_escape.h',
166 'mac/authorization_util.h',
167 'mac/authorization_util.mm',
168 'mac/bundle_locations.h',
169 'mac/bundle_locations.mm',
170 'mac/cocoa_protocols.h',
171 'mac/crash_logging.h',
172 'mac/crash_logging.mm',
173 'mac/foundation_util.h',
174 'mac/foundation_util.mm',
178 'mac/mac_logging.cc',
181 'mac/objc_property_releaser.h',
182 'mac/objc_property_releaser.mm',
183 'mac/os_crash_dumps.cc',
184 'mac/os_crash_dumps.h',
185 'mac/scoped_aedesc.h',
186 'mac/scoped_authorizationref.h',
187 'mac/scoped_cftyperef.h',
188 'mac/scoped_ioobject.h',
189 'mac/scoped_launch_data.h',
190 'mac/scoped_nsautorelease_pool.h',
191 'mac/scoped_nsautorelease_pool.mm',
192 'mac/scoped_nsexception_enabler.h',
193 'mac/scoped_nsexception_enabler.mm',
194 'mac/scoped_sending_event.h',
195 'mac/scoped_sending_event.mm',
198 'memory/linked_ptr.h',
199 'memory/mru_cache.h',
200 'memory/raw_scoped_refptr_mismatch_checker.h',
201 'memory/ref_counted.cc',
202 'memory/ref_counted.h',
203 'memory/ref_counted_memory.cc',
204 'memory/ref_counted_memory.h',
205 'memory/scoped_handle.h',
206 'memory/scoped_nsobject.h',
207 'memory/scoped_open_process.h',
208 'memory/scoped_ptr.h',
209 'memory/scoped_vector.h',
210 'memory/singleton.cc',
211 'memory/singleton.h',
212 'memory/weak_ptr.cc',
216 'message_loop_helpers.h',
217 'message_loop_proxy.cc',
218 'message_loop_proxy.h',
219 'message_loop_proxy_impl.cc',
220 'message_loop_proxy_impl.h',
223 'message_pump_default.cc',
224 'message_pump_default.h',
225 'message_pump_win.cc',
226 'message_pump_win.h',
227 'metrics/histogram.cc',
228 'metrics/histogram.h',
229 'metrics/stats_counters.cc',
230 'metrics/stats_counters.h',
231 'metrics/stats_table.cc',
232 'metrics/stats_table.h',
235 'native_library_mac.mm',
236 'native_library_posix.cc',
237 'native_library_win.cc',
239 'observer_list_threadsafe.h',
240 'os_compat_android.cc',
241 'os_compat_android.h',
250 'platform_file_posix.cc',
251 'platform_file_win.cc',
258 'process_util_freebsd.cc',
259 'process_util_linux.cc',
260 'process_util_mac.mm',
261 'process_util_openbsd.cc',
262 'process_util_posix.cc',
263 'process_util_win.cc',
265 'profiler/scoped_profile.cc',
266 'profiler/scoped_profile.h',
267 'profiler/alternate_timer.cc',
268 'profiler/alternate_timer.h',
269 'profiler/tracked_time.cc',
270 'profiler/tracked_time.h',
276 'rand_util_posix.cc',
278 'safe_strerror_posix.cc',
279 'safe_strerror_posix.h',
280 'scoped_native_library.cc',
281 'scoped_native_library.h',
282 'scoped_temp_dir.cc',
284 'sequenced_task_runner.cc',
285 'sequenced_task_runner.h',
286 'sequenced_task_runner_helpers.h',
291 'shared_memory_android.cc',
292 'shared_memory_posix.cc',
293 'shared_memory_win.cc',
294 'single_thread_task_runner.h',
297 'string_number_conversions.cc',
298 'string_number_conversions.h',
303 'string_tokenizer.h',
306 'string_util_posix.h',
308 'stringize_macros.h',
311 'supports_user_data.cc',
312 'supports_user_data.h',
313 'synchronization/cancellation_flag.cc',
314 'synchronization/cancellation_flag.h',
315 'synchronization/condition_variable.h',
316 'synchronization/condition_variable_posix.cc',
317 'synchronization/condition_variable_win.cc',
318 'synchronization/lock.cc',
319 'synchronization/lock.h',
320 'synchronization/lock_impl.h',
321 'synchronization/lock_impl_posix.cc',
322 'synchronization/lock_impl_win.cc',
323 'synchronization/spin_wait.h',
324 'synchronization/waitable_event.h',
325 'synchronization/waitable_event_posix.cc',
326 'synchronization/waitable_event_watcher.h',
327 'synchronization/waitable_event_watcher_posix.cc',
328 'synchronization/waitable_event_watcher_win.cc',
329 'synchronization/waitable_event_win.cc',
330 'system_monitor/system_monitor.cc',
331 'system_monitor/system_monitor.h',
332 'system_monitor/system_monitor_android.cc',
333 'system_monitor/system_monitor_mac.mm',
334 'system_monitor/system_monitor_posix.cc',
335 'system_monitor/system_monitor_win.cc',
338 'sys_info_chromeos.cc',
339 'sys_info_freebsd.cc',
342 'sys_info_openbsd.cc',
345 'sys_string_conversions.h',
346 'sys_string_conversions_mac.mm',
347 'sys_string_conversions_posix.cc',
348 'sys_string_conversions_win.cc',
351 'task_runner_util.h',
353 'thread_task_runner_handle.cc',
354 'thread_task_runner_handle.h',
355 'threading/non_thread_safe.h',
356 'threading/non_thread_safe_impl.cc',
357 'threading/non_thread_safe_impl.h',
358 'threading/platform_thread.h',
359 'threading/platform_thread_mac.mm',
360 'threading/platform_thread_posix.cc',
361 'threading/platform_thread_win.cc',
362 'threading/post_task_and_reply_impl.cc',
363 'threading/post_task_and_reply_impl.h',
364 'threading/sequenced_worker_pool.cc',
365 'threading/sequenced_worker_pool.h',
366 'threading/simple_thread.cc',
367 'threading/simple_thread.h',
368 'threading/thread.cc',
369 'threading/thread.h',
370 'threading/thread_checker.h',
371 'threading/thread_checker_impl.cc',
372 'threading/thread_checker_impl.h',
373 'threading/thread_collision_warner.cc',
374 'threading/thread_collision_warner.h',
375 'threading/thread_local.h',
376 'threading/thread_local_posix.cc',
377 'threading/thread_local_storage.h',
378 'threading/thread_local_storage_posix.cc',
379 'threading/thread_local_storage_win.cc',
380 'threading/thread_local_win.cc',
381 'threading/thread_restrictions.h',
382 'threading/thread_restrictions.cc',
383 'threading/watchdog.cc',
384 'threading/watchdog.h',
385 'threading/worker_pool.h',
386 'threading/worker_pool.cc',
387 'threading/worker_pool_posix.cc',
388 'threading/worker_pool_posix.h',
389 'threading/worker_pool_win.cc',
395 'tracked_objects.cc',
400 'utf_offset_string_conversions.cc',
401 'utf_offset_string_conversions.h',
402 'utf_string_conversion_utils.cc',
403 'utf_string_conversion_utils.h',
404 'utf_string_conversions.cc',
405 'utf_string_conversions.h',
408 'value_conversions.cc',
409 'value_conversions.h',
414 'nix/mime_util_xdg.cc',
415 'nix/mime_util_xdg.h',
418 'win/accessibility_misc_utils.h',
419 'win/accessibility_misc_utils.cc',
420 'win/enum_variant.h',
421 'win/enum_variant.cc',
422 'win/event_trace_consumer.h',
423 'win/event_trace_controller.cc',
424 'win/event_trace_controller.h',
425 'win/event_trace_provider.cc',
426 'win/event_trace_provider.h',
429 'win/iat_patch_function.cc',
430 'win/iat_patch_function.h',
431 'win/iunknown_impl.h',
432 'win/iunknown_impl.cc',
435 'win/object_watcher.cc',
436 'win/object_watcher.h',
439 'win/resource_util.cc',
440 'win/resource_util.h',
441 'win/sampling_profiler.cc',
442 'win/sampling_profiler.h',
443 'win/scoped_bstr.cc',
445 'win/scoped_co_mem.h',
446 'win/scoped_com_initializer.h',
447 'win/scoped_comptr.h',
448 'win/scoped_gdi_object.h',
449 'win/scoped_handle.h',
451 'win/scoped_hglobal.h',
452 'win/scoped_process_information.cc',
453 'win/scoped_process_information.h',
454 'win/scoped_select_object.h',
455 'win/scoped_variant.cc',
456 'win/scoped_variant.h',
457 'win/windows_version.cc',
458 'win/windows_version.h',
461 'win/wrapped_window_proc.cc',
462 'win/wrapped_window_proc.h',
465 'BASE_IMPLEMENTATION',
470 # These warnings are needed for the files in third_party\dmg_fp.
471 'msvs_disabled_warnings': [
472 4244, 4554, 4018, 4102,
474 'mac_framework_dirs': [
475 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
480 ['exclude', '^nix/'],
483 'atomicops_internals_x86_gcc.cc',
484 'message_pump_glib.cc',
488 [ 'toolkit_uses_gtk==0', {
489 'sources!': [ 'message_pump_gtk.cc', ],
491 [ 'use_aura==0 or OS == "win" or OS == "mac"', {
492 'sources!' : [ 'message_pump_x.cc', ],
494 'sources!' : [ 'message_pump_gtk.cc', ],
495 'sources/' : [ [ 'include', '^message_pump_x\\.cc$', ] ],
497 [ 'OS != "linux" and os_bsd != 1', {
499 # Not automatically excluded by the *linux.cc rules.
504 [ 'OS == "android"', {
506 'files/file_path_watcher_kqueue.cc',
507 'system_monitor/system_monitor_posix.cc',
510 ['include', '^process_util_linux\\.cc$'],
511 ['include', '^sys_info_linux\\.cc$'],
512 ['include', '^sys_string_conversions_posix\\.cc$'],
513 ['include', '^worker_pool_linux\\.cc$'],
518 'mac/scoped_aedesc.h'
521 # For now, just test the *BSD platforms enough to exclude them.
522 # Subsequent changes will include them further.
523 [ 'OS != "freebsd"', {
524 'sources/': [ ['exclude', '_freebsd\\.cc$'] ],
527 [ 'OS != "openbsd"', {
528 'sources/': [ ['exclude', '_openbsd\\.cc$'] ],
532 'sources/': [ ['exclude', '^win/'] ],
535 ['OS != "android"', {
536 'sources/': [ ['exclude', '^android/'] ],
541 '<(DEPTH)/third_party/wtl/include',
544 'event_recorder_stubs.cc',
545 'file_descriptor_shuffle.cc',
546 'files/file_path_watcher_kqueue.cc',
547 'files/file_path_watcher_stub.cc',
548 'message_pump_libevent.cc',
549 # Not using sha1_win.cc because it may have caused a
550 # regression to page cycler moz.
557 'files/file_path_watcher_kqueue.cc',
558 'files/file_path_watcher_stub.cc',
563 ['exclude', '^files/file_path_watcher_stub\\.cc$'],
564 ['exclude', '^base_paths_posix\\.cc$'],
565 ['exclude', '^native_library_posix\\.cc$'],
566 ['exclude', '^sys_string_conversions_posix\\.cc$'],
571 ['exclude', '^files/file_path_watcher_linux\\.cc$'],
572 ['exclude', '^files/file_path_watcher_stub\\.cc$'],
573 ['exclude', '^file_util_linux\\.cc$'],
574 ['exclude', '^process_linux\\.cc$'],
575 ['exclude', '^process_util_linux\\.cc$'],
576 ['exclude', '^sys_info_linux\\.cc$'],
581 ['exclude', '^chromeos/'],
590 'target_name': 'base',
591 'type': '<(component)',
592 'toolsets': ['host', 'target'],
595 'enable_wexit_time_destructors': 1,
600 'allocator/allocator.gyp:allocator_extension_thunks',
601 '../testing/gtest.gyp:gtest_prod',
602 '../third_party/modp_b64/modp_b64.gyp:modp_b64',
603 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
605 # TODO(gregoryd): direct_dependent_settings should be shared with the
606 # 64-bit target, but it doesn't work due to a bug in gyp
607 'direct_dependent_settings': {
616 'sources/': [ ['include', '_chromeos\\.cc$'] ]
619 [ 'linux_use_tcmalloc==0', {
623 'direct_dependent_settings': {
630 [ 'toolkit_uses_gtk==1', {
632 '../build/linux/system.gyp:gtk',
634 'export_dependent_settings': [
635 '../build/linux/system.gyp:gtk',
641 '../build/util/build_util.gyp:lastchange#target',
642 '../build/linux/system.gyp:glib',
643 '../build/linux/system.gyp:x11',
650 '-Wno-write-strings',
652 'export_dependent_settings': [
653 '../build/linux/system.gyp:glib',
654 '../build/linux/system.gyp:x11',
658 ['exclude', '/xdg_user_dirs/'],
659 ['exclude', '_nss\.cc$'],
662 [ 'OS == "android" and _toolset == "host"', {
663 # Base for host support is the minimum required to run the
664 # ssl false start blacklist tool. It requires further changes
665 # to generically support host builds (and tests).
666 # Note: when building for host, gyp has OS == "android",
667 # hence the *_android.cc files are included but the actual code
668 # doesn't have OS_ANDROID / ANDROID defined.
670 # Host build on linux depends on system.gyp::gtk as
671 # default linux build has TOOLKIT_GTK defined.
672 ['host_os == "linux"', {
674 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
677 '../build/linux/system.gyp:gtk',
679 'export_dependent_settings': [
680 '../build/linux/system.gyp:gtk',
683 ['host_os == "mac"', {
685 ['exclude', '^native_library_linux\\.cc$'],
686 ['exclude', '^process_util_linux\\.cc$'],
687 ['exclude', '^sys_info_linux\\.cc$'],
688 ['exclude', '^sys_string_conversions_linux\\.cc$'],
689 ['exclude', '^worker_pool_linux\\.cc$'],
694 [ 'OS == "android" and _toolset == "target"', {
696 ['target_arch == "ia32"', {
698 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
704 '../third_party/ashmem/ashmem.gyp:ashmem',
705 '../third_party/icu/icu.gyp:icuuc',
710 '<(SHARED_INTERMEDIATE_DIR)/base',
721 'debug/stack_trace.cc',
722 'debug/stack_trace_posix.cc',
727 '/usr/local/include',
731 '-L/usr/local/lib -lexecinfo',
739 # We need rt for clock_gettime().
741 # For 'native_library_linux.cc'
749 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
750 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
751 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
752 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
753 '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
754 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
758 '../third_party/mach_override/mach_override.gyp:mach_override',
762 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
764 [ 'component=="shared_library"', {
768 'debug/debug_on_start_win.cc',
775 'third_party/nspr/prcpucfg.h',
776 'third_party/nspr/prcpucfg_win.h',
777 'third_party/nspr/prtypes.h',
778 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
779 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
784 'event_recorder_stubs.cc',
785 'event_recorder_win.cc',
786 'file_descriptor_shuffle.cc',
787 'file_descriptor_shuffle.h',
792 'message_pump_android.cc',
793 'message_pump_android.h',
794 'message_pump_glib.cc',
795 'message_pump_glib.h',
796 'message_pump_gtk.cc',
797 'message_pump_gtk.h',
798 'message_pump_observer.h',
801 'message_pump_libevent.cc',
802 'message_pump_libevent.h',
803 'message_pump_mac.h',
804 'message_pump_mac.mm',
805 'metrics/field_trial.cc',
806 'metrics/field_trial.h',
810 'sync_socket_win.cc',
811 'sync_socket_posix.cc',
821 'target_name': 'base_nacl_win64',
822 'type': '<(component)',
828 'allocator/allocator.gyp:allocator_extension_thunks_win64',
829 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
831 # TODO(gregoryd): direct_dependent_settings should be shared with the
832 # 32-bit target, but it doesn't work due to a bug in gyp
833 'direct_dependent_settings': {
839 '<@(nacl_win64_defines)',
843 'msvs_target_platform': 'x64',
847 [ 'component == "shared_library"', {
849 'debug/debug_on_start_win.cc',
855 'target_name': 'base_i18n_nacl_win64',
856 'type': '<(component)',
857 # TODO(gregoryd): direct_dependent_settings should be shared with the
858 # 32-bit target, but it doesn't work due to a bug in gyp
859 'direct_dependent_settings': {
865 '<@(nacl_win64_defines)',
866 'BASE_I18N_IMPLEMENTATION',
872 'i18n/icu_util_nacl_win64.cc',
876 'msvs_target_platform': 'x64',
882 [ 'os_posix==1 and OS!="mac"', {
885 'target_name': 'symbolize',
886 'type': 'static_library',
887 'toolsets': ['host', 'target'],
892 [ 'OS == "solaris"', {
895 '/usr/gnu/include/libelf',
906 'third_party/symbolize/config.h',
907 'third_party/symbolize/demangle.cc',
908 'third_party/symbolize/demangle.h',
909 'third_party/symbolize/glog/logging.h',
910 'third_party/symbolize/glog/raw_logging.h',
911 'third_party/symbolize/symbolize.cc',
912 'third_party/symbolize/symbolize.h',
913 'third_party/symbolize/utilities.h',
920 'target_name': 'xdg_mime',
921 'type': 'static_library',
922 'toolsets': ['host', 'target'],
930 'third_party/xdg_mime/xdgmime.c',
931 'third_party/xdg_mime/xdgmime.h',
932 'third_party/xdg_mime/xdgmimealias.c',
933 'third_party/xdg_mime/xdgmimealias.h',
934 'third_party/xdg_mime/xdgmimecache.c',
935 'third_party/xdg_mime/xdgmimecache.h',
936 'third_party/xdg_mime/xdgmimeglob.c',
937 'third_party/xdg_mime/xdgmimeglob.h',
938 'third_party/xdg_mime/xdgmimeicon.c',
939 'third_party/xdg_mime/xdgmimeicon.h',
940 'third_party/xdg_mime/xdgmimeint.c',
941 'third_party/xdg_mime/xdgmimeint.h',
942 'third_party/xdg_mime/xdgmimemagic.c',
943 'third_party/xdg_mime/xdgmimemagic.h',
944 'third_party/xdg_mime/xdgmimeparent.c',
945 'third_party/xdg_mime/xdgmimeparent.h',