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 'android/scoped_java_ref.cc',
25 'android/scoped_java_ref.h',
26 'android/jni_android.cc',
27 'android/jni_android.h',
28 'android/jni_array.cc',
29 'android/jni_array.h',
30 'android/jni_string.cc',
31 'android/jni_string.h',
32 'android/path_utils.cc',
33 'android/path_utils.h',
37 'atomic_sequence_num.h',
39 'atomicops_internals_x86_gcc.cc',
40 'atomicops_internals_x86_gcc.h',
41 'atomicops_internals_x86_msvc.h',
45 'base_paths_android.cc',
48 'base_paths_posix.cc',
57 'bind_internal_win.h',
62 'callback_internal.cc',
63 'callback_internal.h',
64 'cancelable_callback.h',
67 'compiler_specific.h',
72 'debug/debug_on_start_win.cc',
73 'debug/debug_on_start_win.h',
76 'debug/debugger_posix.cc',
77 'debug/debugger_win.cc',
78 'debug/leak_annotations.h',
79 'debug/leak_tracker.h',
82 'debug/stack_trace.cc',
83 'debug/stack_trace.h',
84 'debug/stack_trace_android.cc',
85 'debug/stack_trace_posix.cc',
86 'debug/stack_trace_win.cc',
87 'debug/trace_event.cc',
88 'debug/trace_event.h',
89 'debug/trace_event_impl.cc',
90 'debug/trace_event_impl.h',
91 'debug/trace_event_win.cc',
92 'dir_reader_fallback.h',
98 'file_descriptor_posix.h',
103 'file_util_android.cc',
104 'file_util_deprecated.h',
105 'file_util_linux.cc',
107 'file_util_posix.cc',
109 'file_util_proxy.cc',
111 'file_version_info.h',
112 'file_version_info_mac.h',
113 'file_version_info_mac.mm',
114 'file_version_info_win.cc',
115 'file_version_info_win.h',
116 'files/file_path_watcher.cc',
117 'files/file_path_watcher.h',
118 'files/file_path_watcher_kqueue.cc',
119 'files/file_path_watcher_linux.cc',
120 'files/file_path_watcher_stub.cc',
121 'files/file_path_watcher_win.cc',
124 'global_descriptors_posix.cc',
125 'global_descriptors_posix.h',
129 'json/json_reader.cc',
130 'json/json_reader.h',
131 'json/json_value_converter.h',
132 'json/json_value_serializer.cc',
133 'json/json_value_serializer.h',
134 'json/json_writer.cc',
135 'json/json_writer.h',
136 'json/string_escape.cc',
137 'json/string_escape.h',
147 'mac/bundle_locations.h',
148 'mac/bundle_locations.mm',
149 'mac/cocoa_protocols.h',
150 'mac/crash_logging.h',
151 'mac/crash_logging.mm',
152 'mac/foundation_util.h',
153 'mac/foundation_util.mm',
155 'mac/mac_logging.cc',
158 'mac/objc_property_releaser.h',
159 'mac/objc_property_releaser.mm',
160 'mac/os_crash_dumps.cc',
161 'mac/os_crash_dumps.h',
162 'mac/scoped_aedesc.h',
163 'mac/scoped_cftyperef.h',
164 'mac/scoped_nsautorelease_pool.h',
165 'mac/scoped_nsautorelease_pool.mm',
166 'mac/scoped_nsexception_enabler.h',
167 'mac/scoped_nsexception_enabler.mm',
168 'mac/scoped_sending_event.h',
169 'mac/scoped_sending_event.mm',
172 'memory/linked_ptr.h',
173 'memory/mru_cache.h',
174 'memory/raw_scoped_refptr_mismatch_checker.h',
175 'memory/ref_counted.cc',
176 'memory/ref_counted.h',
177 'memory/ref_counted_memory.cc',
178 'memory/ref_counted_memory.h',
179 'memory/scoped_handle.h',
180 'memory/scoped_nsobject.h',
181 'memory/scoped_open_process.h',
182 'memory/scoped_ptr.h',
183 'memory/scoped_vector.h',
184 'memory/singleton.cc',
185 'memory/singleton.h',
186 'memory/weak_ptr.cc',
190 'message_loop_proxy.cc',
191 'message_loop_proxy.h',
192 'message_loop_proxy_impl.cc',
193 'message_loop_proxy_impl.h',
196 'message_pump_default.cc',
197 'message_pump_default.h',
198 'message_pump_win.cc',
199 'message_pump_win.h',
200 'metrics/histogram.cc',
201 'metrics/histogram.h',
202 'metrics/stats_counters.cc',
203 'metrics/stats_counters.h',
204 'metrics/stats_table.cc',
205 'metrics/stats_table.h',
208 'native_library_mac.mm',
209 'native_library_posix.cc',
210 'native_library_win.cc',
212 'observer_list_threadsafe.h',
213 'os_compat_android.cc',
214 'os_compat_android.h',
223 'platform_file_posix.cc',
224 'platform_file_win.cc',
231 'process_util_freebsd.cc',
232 'process_util_linux.cc',
233 'process_util_mac.mm',
234 'process_util_openbsd.cc',
235 'process_util_posix.cc',
236 'process_util_win.cc',
238 'profiler/scoped_profile.cc',
239 'profiler/scoped_profile.h',
240 'profiler/tracked_time.cc',
241 'profiler/tracked_time.h',
247 'rand_util_posix.cc',
249 'safe_strerror_posix.cc',
250 'safe_strerror_posix.h',
251 'scoped_native_library.cc',
252 'scoped_native_library.h',
253 'scoped_temp_dir.cc',
259 'shared_memory_android.cc',
260 'shared_memory_posix.cc',
261 'shared_memory_win.cc',
265 'string_number_conversions.cc',
266 'string_number_conversions.h',
271 'string_tokenizer.h',
274 'string_util_posix.h',
276 'stringize_macros.h',
279 'synchronization/cancellation_flag.cc',
280 'synchronization/cancellation_flag.h',
281 'synchronization/condition_variable.h',
282 'synchronization/condition_variable_posix.cc',
283 'synchronization/condition_variable_win.cc',
284 'synchronization/lock.cc',
285 'synchronization/lock.h',
286 'synchronization/lock_impl.h',
287 'synchronization/lock_impl_posix.cc',
288 'synchronization/lock_impl_win.cc',
289 'synchronization/waitable_event.h',
290 'synchronization/waitable_event_posix.cc',
291 'synchronization/waitable_event_watcher.h',
292 'synchronization/waitable_event_watcher_posix.cc',
293 'synchronization/waitable_event_watcher_win.cc',
294 'synchronization/waitable_event_win.cc',
295 'system_monitor/system_monitor.cc',
296 'system_monitor/system_monitor.h',
297 'system_monitor/system_monitor_android.cc',
298 'system_monitor/system_monitor_mac.mm',
299 'system_monitor/system_monitor_posix.cc',
300 'system_monitor/system_monitor_win.cc',
303 'sys_info_chromeos.cc',
304 'sys_info_freebsd.cc',
307 'sys_info_openbsd.cc',
310 'sys_string_conversions.h',
311 'sys_string_conversions_mac.mm',
312 'sys_string_conversions_posix.cc',
313 'sys_string_conversions_win.cc',
315 'threading/non_thread_safe.h',
316 'threading/non_thread_safe_impl.cc',
317 'threading/non_thread_safe_impl.h',
318 'threading/platform_thread.h',
319 'threading/platform_thread_mac.mm',
320 'threading/platform_thread_posix.cc',
321 'threading/platform_thread_win.cc',
322 'threading/post_task_and_reply_impl.cc',
323 'threading/post_task_and_reply_impl.h',
324 'threading/sequenced_worker_pool.cc',
325 'threading/sequenced_worker_pool.h',
326 'threading/simple_thread.cc',
327 'threading/simple_thread.h',
328 'threading/thread.cc',
329 'threading/thread.h',
330 'threading/thread_checker.h',
331 'threading/thread_checker_impl.cc',
332 'threading/thread_checker_impl.h',
333 'threading/thread_collision_warner.cc',
334 'threading/thread_collision_warner.h',
335 'threading/thread_local.h',
336 'threading/thread_local_posix.cc',
337 'threading/thread_local_storage.h',
338 'threading/thread_local_storage_posix.cc',
339 'threading/thread_local_storage_win.cc',
340 'threading/thread_local_win.cc',
341 'threading/thread_restrictions.h',
342 'threading/thread_restrictions.cc',
343 'threading/watchdog.cc',
344 'threading/watchdog.h',
345 'threading/worker_pool.h',
346 'threading/worker_pool.cc',
347 'threading/worker_pool_posix.cc',
348 'threading/worker_pool_posix.h',
349 'threading/worker_pool_win.cc',
355 'tracked_objects.cc',
360 'utf_offset_string_conversions.cc',
361 'utf_offset_string_conversions.h',
362 'utf_string_conversion_utils.cc',
363 'utf_string_conversion_utils.h',
364 'utf_string_conversions.cc',
365 'utf_string_conversions.h',
368 'value_conversions.cc',
369 'value_conversions.h',
374 'nix/mime_util_xdg.cc',
375 'nix/mime_util_xdg.h',
378 'wayland/wayland_event.h',
379 'win/enum_variant.h',
380 'win/enum_variant.cc',
381 'win/event_trace_consumer.h',
382 'win/event_trace_controller.cc',
383 'win/event_trace_controller.h',
384 'win/event_trace_provider.cc',
385 'win/event_trace_provider.h',
388 'win/iat_patch_function.cc',
389 'win/iat_patch_function.h',
390 'win/iunknown_impl.h',
391 'win/iunknown_impl.cc',
392 'win/object_watcher.cc',
393 'win/object_watcher.h',
396 'win/resource_util.cc',
397 'win/resource_util.h',
398 'win/sampling_profiler.cc',
399 'win/sampling_profiler.h',
400 'win/scoped_bstr.cc',
402 'win/scoped_co_mem.h',
403 'win/scoped_com_initializer.h',
404 'win/scoped_comptr.h',
405 'win/scoped_gdi_object.h',
406 'win/scoped_handle.h',
408 'win/scoped_hglobal.h',
409 'win/scoped_select_object.h',
410 'win/scoped_variant.cc',
411 'win/scoped_variant.h',
412 'win/windows_version.cc',
413 'win/windows_version.h',
416 'win/wrapped_window_proc.cc',
417 'win/wrapped_window_proc.h',
420 'BASE_IMPLEMENTATION',
425 # These warnings are needed for the files in third_party\dmg_fp.
426 'msvs_disabled_warnings': [
427 4244, 4554, 4018, 4102,
429 'mac_framework_dirs': [
430 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework/Frameworks',
435 ['exclude', '^nix/'],
438 'atomicops_internals_x86_gcc.cc',
439 'message_pump_glib.cc',
443 [ 'toolkit_uses_gtk==0', {
444 'sources!': [ 'message_pump_gtk.cc', ],
446 [ 'use_aura==0 or OS == "win" or OS == "mac"', {
447 'sources!' : [ 'message_pump_x.cc', ],
449 'sources!' : [ 'message_pump_gtk.cc', ],
450 'sources/' : [ [ 'include', '^message_pump_x\\.cc$', ] ],
452 [ 'use_wayland==1', {
454 [ 'exclude', '^message_pump_gtk\\.cc$',],
455 [ 'exclude', '^message_pump_x\\.cc$',],
458 [ 'OS != "linux" and os_bsd != 1', {
460 # Not automatically excluded by the *linux.cc rules.
465 [ 'OS == "android"', {
467 'files/file_path_watcher_kqueue.cc',
468 'system_monitor/system_monitor_posix.cc',
471 ['include', '^process_util_linux\\.cc$'],
472 ['include', '^sys_info_linux\\.cc$'],
473 ['include', '^sys_string_conversions_posix\\.cc$'],
474 ['include', '^worker_pool_linux\\.cc$'],
475 # TODO(michaelbai): The below files are excluded because of the
476 # missing JNI, add them back when JNI is ready.
477 ['exclude', '^android/'],
478 ['exclude', '^base_paths_android\\.cc$'],
479 ['exclude', '^message_pump_android\\.cc$'],
484 'mac/scoped_aedesc.h'
487 # For now, just test the *BSD platforms enough to exclude them.
488 # Subsequent changes will include them further.
489 [ 'OS != "freebsd"', {
490 'sources/': [ ['exclude', '_freebsd\\.cc$'] ],
493 [ 'OS != "openbsd"', {
494 'sources/': [ ['exclude', '_openbsd\\.cc$'] ],
498 'sources/': [ ['exclude', '^win/'] ],
501 ['OS != "android"', {
502 'sources/': [ ['exclude', '^android/'] ],
507 '<(DEPTH)/third_party/wtl/include',
510 'event_recorder_stubs.cc',
511 'file_descriptor_shuffle.cc',
512 'files/file_path_watcher_kqueue.cc',
513 'files/file_path_watcher_stub.cc',
514 'message_pump_libevent.cc',
515 # Not using sha1_win.cc because it may have caused a
516 # regression to page cycler moz.
523 'files/file_path_watcher_kqueue.cc',
524 'files/file_path_watcher_stub.cc',
529 ['exclude', '^files/file_path_watcher_stub\\.cc$'],
530 ['exclude', '^base_paths_posix\\.cc$'],
531 ['exclude', '^native_library_posix\\.cc$'],
532 ['exclude', '^sys_string_conversions_posix\\.cc$'],
537 ['exclude', '^files/file_path_watcher_linux\\.cc$'],
538 ['exclude', '^files/file_path_watcher_stub\\.cc$'],
539 ['exclude', '^file_util_linux\\.cc$'],
540 ['exclude', '^process_linux\\.cc$'],
541 ['exclude', '^process_util_linux\\.cc$'],
542 ['exclude', '^sys_info_linux\\.cc$'],
551 'target_name': 'base',
552 'type': '<(component)',
553 'toolsets': ['host', 'target'],
556 'enable_wexit_time_destructors': 1,
561 '../testing/gtest.gyp:gtest_prod',
562 '../third_party/modp_b64/modp_b64.gyp:modp_b64',
563 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
565 # TODO(gregoryd): direct_dependent_settings should be shared with the
566 # 64-bit target, but it doesn't work due to a bug in gyp
567 'direct_dependent_settings': {
576 'sources/': [ ['include', '_chromeos\\.cc$'] ]
579 [ 'linux_use_tcmalloc==0', {
583 'direct_dependent_settings': {
590 [ 'toolkit_uses_gtk==1', {
592 '../build/linux/system.gyp:gtk',
594 'export_dependent_settings': [
595 '../build/linux/system.gyp:gtk',
601 '../build/util/build_util.gyp:lastchange#target',
602 '../build/linux/system.gyp:glib',
603 '../build/linux/system.gyp:x11',
610 '-Wno-write-strings',
612 'export_dependent_settings': [
613 '../build/linux/system.gyp:glib',
614 '../build/linux/system.gyp:x11',
618 ['exclude', '/xdg_user_dirs/'],
619 ['exclude', '_nss\.cc$'],
622 [ 'OS == "android" and _toolset == "host"', {
623 # Base for host support is the minimum required to run the
624 # ssl false start blacklist tool. It requires further changes
625 # to generically support host builds (and tests).
626 # Note: when building for host, gyp has OS == "android",
627 # hence the *_android.cc files are included but the actual code
628 # doesn't have OS_ANDROID / ANDROID defined.
630 ['host_os == "linux"', {
632 ['include', '^atomicops_internals_x86_gcc\\.cc$'],
635 '../build/linux/system.gyp:glib',
637 'export_dependent_settings': [
638 '../build/linux/system.gyp:glib',
641 ['host_os == "mac"', {
643 ['exclude', '^native_library_linux\\.cc$'],
644 ['exclude', '^process_util_linux\\.cc$'],
645 ['exclude', '^sys_info_linux\\.cc$'],
646 ['exclude', '^sys_string_conversions_linux\\.cc$'],
647 ['exclude', '^worker_pool_linux\\.cc$'],
652 [ 'OS == "android" and _toolset == "target"', {
655 '../third_party/ashmem/ashmem.gyp:ashmem',
666 'debug/stack_trace.cc',
667 'debug/stack_trace_posix.cc',
672 '/usr/local/include',
676 '-L/usr/local/lib -lexecinfo',
684 # We need rt for clock_gettime().
686 # For 'native_library_linux.cc'
694 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
695 '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
696 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
697 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
698 '$(SDKROOT)/System/Library/Frameworks/IOKit.framework',
699 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
703 '../third_party/mach_override/mach_override.gyp:mach_override',
707 'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
709 [ 'component=="shared_library"', {
713 'debug/debug_on_start_win.cc',
720 'third_party/nspr/prcpucfg.h',
721 'third_party/nspr/prcpucfg_win.h',
722 'third_party/nspr/prtypes.h',
723 'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
724 'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
729 'event_recorder_stubs.cc',
730 'event_recorder_win.cc',
731 'file_descriptor_shuffle.cc',
732 'file_descriptor_shuffle.h',
737 'message_pump_android.cc',
738 'message_pump_android.h',
739 'message_pump_glib.cc',
740 'message_pump_glib.h',
741 'message_pump_gtk.cc',
742 'message_pump_gtk.h',
743 'message_pump_observer.h',
746 'message_pump_libevent.cc',
747 'message_pump_libevent.h',
748 'message_pump_mac.h',
749 'message_pump_mac.mm',
750 'message_pump_wayland.h',
751 'metrics/field_trial.cc',
752 'metrics/field_trial.h',
756 'sync_socket_win.cc',
757 'sync_socket_posix.cc',
767 'target_name': 'base_nacl_win64',
768 'type': '<(component)',
774 'third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
776 # TODO(gregoryd): direct_dependent_settings should be shared with the
777 # 32-bit target, but it doesn't work due to a bug in gyp
778 'direct_dependent_settings': {
784 '<@(nacl_win64_defines)',
788 'msvs_target_platform': 'x64',
792 [ 'component == "shared_library"', {
794 'debug/debug_on_start_win.cc',
800 'target_name': 'base_i18n_nacl_win64',
801 'type': '<(component)',
802 # TODO(gregoryd): direct_dependent_settings should be shared with the
803 # 32-bit target, but it doesn't work due to a bug in gyp
804 'direct_dependent_settings': {
810 '<@(nacl_win64_defines)',
811 'BASE_I18N_IMPLEMENTATION',
817 'i18n/icu_util_nacl_win64.cc',
821 'msvs_target_platform': 'x64',
827 [ 'os_posix==1 and OS!="mac"', {
830 'target_name': 'symbolize',
831 'type': 'static_library',
832 'toolsets': ['host', 'target'],
837 [ 'OS == "solaris"', {
840 '/usr/gnu/include/libelf',
851 'third_party/symbolize/config.h',
852 'third_party/symbolize/demangle.cc',
853 'third_party/symbolize/demangle.h',
854 'third_party/symbolize/glog/logging.h',
855 'third_party/symbolize/glog/raw_logging.h',
856 'third_party/symbolize/symbolize.cc',
857 'third_party/symbolize/symbolize.h',
858 'third_party/symbolize/utilities.h',
865 'target_name': 'xdg_mime',
866 'type': 'static_library',
867 'toolsets': ['host', 'target'],
875 'third_party/xdg_mime/xdgmime.c',
876 'third_party/xdg_mime/xdgmime.h',
877 'third_party/xdg_mime/xdgmimealias.c',
878 'third_party/xdg_mime/xdgmimealias.h',
879 'third_party/xdg_mime/xdgmimecache.c',
880 'third_party/xdg_mime/xdgmimecache.h',
881 'third_party/xdg_mime/xdgmimeglob.c',
882 'third_party/xdg_mime/xdgmimeglob.h',
883 'third_party/xdg_mime/xdgmimeicon.c',
884 'third_party/xdg_mime/xdgmimeicon.h',
885 'third_party/xdg_mime/xdgmimeint.c',
886 'third_party/xdg_mime/xdgmimeint.h',
887 'third_party/xdg_mime/xdgmimemagic.c',
888 'third_party/xdg_mime/xdgmimemagic.h',
889 'third_party/xdg_mime/xdgmimeparent.c',
890 'third_party/xdg_mime/xdgmimeparent.h',