Fix Win8 metro startup crash from window switcher button
[chromium-blink-merge.git] / base / base.gypi
blobabfe1f5ef86196e589d4b4eac115f1a41e33ef49
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   'target_defaults': {
7     'variables': {
8       'base_target': 0,
9     },
10     'target_conditions': [
11       # This part is shared between the targets defined below.
12       ['base_target==1', {
13         'sources': [
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/prcpucfg.h',
21           'third_party/nspr/prcpucfg_freebsd.h',
22           'third_party/nspr/prcpucfg_linux.h',
23           'third_party/nspr/prcpucfg_mac.h',
24           'third_party/nspr/prcpucfg_nacl.h',
25           'third_party/nspr/prcpucfg_openbsd.h',
26           'third_party/nspr/prcpucfg_solaris.h',
27           'third_party/nspr/prcpucfg_win.h',
28           'third_party/nspr/prtime.cc',
29           'third_party/nspr/prtime.h',
30           'third_party/nspr/prtypes.h',
31           'third_party/xdg_mime/xdgmime.h',
32           'allocator/allocator_extension.cc',
33           'allocator/allocator_extension.h',
34           'allocator/type_profiler_control.cc',
35           'allocator/type_profiler_control.h',
36           'android/activity_status.cc',
37           'android/activity_status.h',
38           'android/base_jni_registrar.cc',
39           'android/base_jni_registrar.h',
40           'android/build_info.cc',
41           'android/build_info.h',
42           'android/cpu_features.cc',
43           'android/important_file_writer_android.cc',
44           'android/important_file_writer_android.h',
45           'android/scoped_java_ref.cc',
46           'android/scoped_java_ref.h',
47           'android/jni_android.cc',
48           'android/jni_android.h',
49           'android/jni_array.cc',
50           'android/jni_array.h',
51           'android/jni_helper.cc',
52           'android/jni_helper.h',
53           'android/jni_registrar.cc',
54           'android/jni_registrar.h',
55           'android/jni_string.cc',
56           'android/jni_string.h',
57           'android/path_service_android.cc',
58           'android/path_service_android.h',
59           'android/path_utils.cc',
60           'android/path_utils.h',
61           'android/thread_utils.h',
62           'at_exit.cc',
63           'at_exit.h',
64           'atomic_ref_count.h',
65           'atomic_sequence_num.h',
66           'atomicops.h',
67           'atomicops_internals_gcc.h',
68           'atomicops_internals_mac.h',
69           'atomicops_internals_tsan.h',
70           'atomicops_internals_x86_gcc.cc',
71           'atomicops_internals_x86_gcc.h',
72           'atomicops_internals_x86_msvc.h',
73           'base_export.h',
74           'base_paths.cc',
75           'base_paths.h',
76           'base_paths_android.cc',
77           'base_paths_android.h',
78           'base_paths_mac.h',
79           'base_paths_mac.mm',
80           'base_paths_posix.cc',
81           'base_paths_posix.h',
82           'base_paths_win.cc',
83           'base_paths_win.h',
84           'base_switches.h',
85           'base64.cc',
86           'base64.h',
87           'basictypes.h',
88           'bind.h',
89           'bind_helpers.cc',
90           'bind_helpers.h',
91           'bind_internal.h',
92           'bind_internal_win.h',
93           'bits.h',
94           'build_time.cc',
95           'build_time.h',
96           'callback.h',
97           'callback_helpers.h',
98           'callback_internal.cc',
99           'callback_internal.h',
100           'cancelable_callback.h',
101           'chromeos/chromeos_version.cc',
102           'chromeos/chromeos_version.h',
103           'command_line.cc',
104           'command_line.h',
105           'compiler_specific.h',
106           'containers/linked_list.h',
107           'containers/mru_cache.h',
108           'containers/small_map.h',
109           'containers/stack_container.h',
110           'cpu.cc',
111           'cpu.h',
112           'critical_closure.h',
113           'critical_closure_ios.mm',
114           'debug/alias.cc',
115           'debug/alias.h',
116           'debug/crash_logging.cc',
117           'debug/crash_logging.h',
118           'debug/debug_on_start_win.cc',
119           'debug/debug_on_start_win.h',
120           'debug/debugger.cc',
121           'debug/debugger.h',
122           'debug/debugger_posix.cc',
123           'debug/debugger_win.cc',
124           # This file depends on files from the 'allocator' target,
125           # but this target does not depend on 'allocator' (see
126           # allocator.gyp for details).
127           'debug/leak_annotations.h',
128           'debug/leak_tracker.h',
129           'debug/profiler.cc',
130           'debug/profiler.h',
131           'debug/stack_trace.cc',
132           'debug/stack_trace.h',
133           'debug/stack_trace_android.cc',
134           'debug/stack_trace_ios.mm',
135           'debug/stack_trace_posix.cc',
136           'debug/stack_trace_win.cc',
137           'debug/trace_event.h',
138           'debug/trace_event_android.cc',
139           'debug/trace_event_impl.cc',
140           'debug/trace_event_impl.h',
141           'debug/trace_event_impl_constants.cc',
142           'debug/trace_event_win.cc',
143           'deferred_sequenced_task_runner.cc',
144           'deferred_sequenced_task_runner.h',
145           'environment.cc',
146           'environment.h',
147           'file_descriptor_posix.h',
148           'file_util.cc',
149           'file_util.h',
150           'file_util_android.cc',
151           'file_util_linux.cc',
152           'file_util_mac.mm',
153           'file_util_posix.cc',
154           'file_util_win.cc',
155           'file_version_info.h',
156           'file_version_info_mac.h',
157           'file_version_info_mac.mm',
158           'file_version_info_win.cc',
159           'file_version_info_win.h',
160           'files/dir_reader_fallback.h',
161           'files/dir_reader_linux.h',
162           'files/dir_reader_posix.h',
163           'files/file_path.cc',
164           'files/file_path.h',
165           'files/file_path_constants.cc',
166           'files/file_path_watcher.cc',
167           'files/file_path_watcher.h',
168           'files/file_path_watcher_kqueue.cc',
169           'files/file_path_watcher_linux.cc',
170           'files/file_path_watcher_stub.cc',
171           'files/file_path_watcher_win.cc',
172           'files/file_util_proxy.cc',
173           'files/file_util_proxy.h',
174           'files/important_file_writer.h',
175           'files/important_file_writer.cc',
176           'files/memory_mapped_file.cc',
177           'files/memory_mapped_file.h',
178           'files/memory_mapped_file_posix.cc',
179           'files/memory_mapped_file_win.cc',
180           'files/scoped_temp_dir.cc',
181           'files/scoped_temp_dir.h',
182           'float_util.h',
183           'format_macros.h',
184           'gtest_prod_util.h',
185           'guid.cc',
186           'guid.h',
187           'guid_posix.cc',
188           'guid_win.cc',
189           'hash.cc',
190           'hash.h',
191           'hash_tables.h',
192           'hi_res_timer_manager_posix.cc',
193           'hi_res_timer_manager_win.cc',
194           'hi_res_timer_manager.h',
195           'id_map.h',
196           'ios/device_util.h',
197           'ios/device_util.mm',
198           'ios/ios_util.h',
199           'ios/ios_util.mm',
200           'ios/scoped_critical_action.h',
201           'ios/scoped_critical_action.mm',
202           'json/json_file_value_serializer.cc',
203           'json/json_file_value_serializer.h',
204           'json/json_parser.cc',
205           'json/json_parser.h',
206           'json/json_reader.cc',
207           'json/json_reader.h',
208           'json/json_string_value_serializer.cc',
209           'json/json_string_value_serializer.h',
210           'json/json_value_converter.h',
211           'json/json_writer.cc',
212           'json/json_writer.h',
213           'json/string_escape.cc',
214           'json/string_escape.h',
215           'lazy_instance.cc',
216           'lazy_instance.h',
217           'location.cc',
218           'location.h',
219           'logging.cc',
220           'logging.h',
221           'logging_win.cc',
222           'logging_win.h',
223           'mac/authorization_util.h',
224           'mac/authorization_util.mm',
225           'mac/bind_objc_block.h',
226           'mac/bundle_locations.h',
227           'mac/bundle_locations.mm',
228           'mac/cocoa_protocols.h',
229           'mac/foundation_util.h',
230           'mac/foundation_util.mm',
231           'mac/launch_services_util.cc',
232           'mac/launch_services_util.h',
233           'mac/launchd.cc',
234           'mac/launchd.h',
235           'mac/libdispatch_task_runner.cc',
236           'mac/libdispatch_task_runner.h',
237           'mac/mac_logging.h',
238           'mac/mac_logging.cc',
239           'mac/mac_util.h',
240           'mac/mac_util.mm',
241           'mac/objc_property_releaser.h',
242           'mac/objc_property_releaser.mm',
243           'mac/os_crash_dumps.cc',
244           'mac/os_crash_dumps.h',
245           'mac/scoped_aedesc.h',
246           'mac/scoped_authorizationref.h',
247           'mac/scoped_block.h',
248           'mac/scoped_cftyperef.h',
249           'mac/scoped_ioobject.h',
250           'mac/scoped_ioplugininterface.h',
251           'mac/scoped_launch_data.h',
252           'mac/scoped_mach_port.cc',
253           'mac/scoped_mach_port.h',
254           'mac/scoped_nsautorelease_pool.h',
255           'mac/scoped_nsautorelease_pool.mm',
256           'mac/scoped_nsexception_enabler.h',
257           'mac/scoped_nsexception_enabler.mm',
258           'mac/scoped_sending_event.h',
259           'mac/scoped_sending_event.mm',
260           'memory/aligned_memory.cc',
261           'memory/aligned_memory.h',
262           'memory/discardable_memory.cc',
263           'memory/discardable_memory.h',
264           'memory/discardable_memory_android.cc',
265           'memory/discardable_memory_mac.cc',
266           'memory/linked_ptr.h',
267           'memory/manual_constructor.h',
268           'memory/raw_scoped_refptr_mismatch_checker.h',
269           'memory/ref_counted.cc',
270           'memory/ref_counted.h',
271           'memory/ref_counted_memory.cc',
272           'memory/ref_counted_memory.h',
273           'memory/scoped_handle.h',
274           'memory/scoped_nsobject.h',
275           'memory/scoped_open_process.h',
276           'memory/scoped_policy.h',
277           'memory/scoped_ptr.h',
278           'memory/scoped_vector.h',
279           'memory/shared_memory.h',
280           'memory/shared_memory_android.cc',
281           'memory/shared_memory_nacl.cc',
282           'memory/shared_memory_posix.cc',
283           'memory/shared_memory_win.cc',
284           'memory/singleton.cc',
285           'memory/singleton.h',
286           'memory/weak_ptr.cc',
287           'memory/weak_ptr.h',
288           'message_loop/message_loop_proxy.cc',
289           'message_loop/message_loop_proxy.h',
290           'message_loop/message_loop_proxy_impl.cc',
291           'message_loop/message_loop_proxy_impl.h',
292           'message_loop.cc',
293           'message_loop.h',
294           'message_pump.cc',
295           'message_pump.h',
296           'message_pump_android.cc',
297           'message_pump_android.h',
298           'message_pump_default.cc',
299           'message_pump_default.h',
300           'message_pump_ozone.cc',
301           'message_pump_ozone.h',
302           'message_pump_win.cc',
303           'message_pump_win.h',
304           'metrics/sample_map.cc',
305           'metrics/sample_map.h',
306           'metrics/sample_vector.cc',
307           'metrics/sample_vector.h',
308           'metrics/bucket_ranges.cc',
309           'metrics/bucket_ranges.h',
310           'metrics/histogram.cc',
311           'metrics/histogram.h',
312           'metrics/histogram_base.cc',
313           'metrics/histogram_base.h',
314           'metrics/histogram_flattener.h',
315           'metrics/histogram_samples.cc',
316           'metrics/histogram_samples.h',
317           'metrics/histogram_snapshot_manager.cc',
318           'metrics/histogram_snapshot_manager.h',
319           'metrics/sparse_histogram.cc',
320           'metrics/sparse_histogram.h',
321           'metrics/statistics_recorder.cc',
322           'metrics/statistics_recorder.h',
323           'metrics/stats_counters.cc',
324           'metrics/stats_counters.h',
325           'metrics/stats_table.cc',
326           'metrics/stats_table.h',
327           'move.h',
328           'native_library.h',
329           'native_library_mac.mm',
330           'native_library_posix.cc',
331           'native_library_win.cc',
332           'observer_list.h',
333           'observer_list_threadsafe.h',
334           'os_compat_android.cc',
335           'os_compat_android.h',
336           'os_compat_nacl.cc',
337           'os_compat_nacl.h',
338           'path_service.cc',
339           'path_service.h',
340           'pending_task.cc',
341           'pending_task.h',
342           'pickle.cc',
343           'pickle.h',
344           'platform_file.cc',
345           'platform_file.h',
346           'platform_file_posix.cc',
347           'platform_file_win.cc',
348           'port.h',
349           'posix/eintr_wrapper.h',
350           'posix/global_descriptors.cc',
351           'posix/global_descriptors.h',
352           'posix/unix_domain_socket_linux.cc',
353           'posix/unix_domain_socket_linux.h',
354           'power_monitor/power_monitor.cc',
355           'power_monitor/power_monitor.h',
356           'power_monitor/power_monitor_android.cc',
357           'power_monitor/power_monitor_android.h',
358           'power_monitor/power_monitor_ios.mm',
359           'power_monitor/power_monitor_mac.mm',
360           'power_monitor/power_monitor_posix.cc',
361           'power_monitor/power_monitor_win.cc',
362           'power_monitor/power_observer.h',
363           'process.h',
364           'process_info.h',
365           'process_info_mac.cc',
366           'process_info_win.cc',
367           'process_linux.cc',
368           'process_posix.cc',
369           'process_util.cc',
370           'process_util.h',
371           'process_util_freebsd.cc',
372           'process_util_ios.mm',
373           'process_util_linux.cc',
374           'process_util_mac.mm',
375           'process_util_openbsd.cc',
376           'process_util_posix.cc',
377           'process_util_win.cc',
378           'process_win.cc',
379           'process/process_metrics.h',
380           'process/process_metrics_freebsd.cc',
381           'process/process_metrics_ios.cc',
382           'process/process_metrics_linux.cc',
383           'process/process_metrics_mac.cc',
384           'process/process_metrics_openbsd.cc',
385           'process/process_metrics_posix.cc',
386           'process/process_metrics_win.cc',
387           'process/internal_linux.cc',
388           'process/internal_linux.h',
389           'profiler/scoped_profile.cc',
390           'profiler/scoped_profile.h',
391           'profiler/alternate_timer.cc',
392           'profiler/alternate_timer.h',
393           'profiler/tracked_time.cc',
394           'profiler/tracked_time.h',
395           'rand_util.cc',
396           'rand_util.h',
397           'rand_util_nacl.cc',
398           'rand_util_posix.cc',
399           'rand_util_win.cc',
400           'run_loop.cc',
401           'run_loop.h',
402           'safe_numerics.h',
403           'safe_strerror_posix.cc',
404           'safe_strerror_posix.h',
405           'scoped_native_library.cc',
406           'scoped_native_library.h',
407           'sequence_checker.h',
408           'sequence_checker_impl.cc',
409           'sequence_checker_impl.h',
410           'sequenced_task_runner.cc',
411           'sequenced_task_runner.h',
412           'sequenced_task_runner_helpers.h',
413           'sha1.h',
414           'sha1_portable.cc',
415           'sha1_win.cc',
416           'single_thread_task_runner.h',
417           'stl_util.h',
418           'string_util.cc',
419           'string_util.h',
420           'string_util_constants.cc',
421           'string_util_posix.h',
422           'string_util_win.h',
423           'string16.cc',
424           'string16.h',
425           'stringprintf.cc',
426           'stringprintf.h',
427           'strings/string_split.cc',
428           'strings/string_split.h',
429           'strings/string_number_conversions.cc',
430           'strings/string_number_conversions.h',
431           'strings/string_piece.cc',
432           'strings/string_piece.h',
433           'strings/string_tokenizer.h',
434           'strings/stringize_macros.h',
435           'strings/sys_string_conversions.h',
436           'strings/sys_string_conversions_mac.mm',
437           'strings/sys_string_conversions_posix.cc',
438           'strings/sys_string_conversions_win.cc',
439           'strings/utf_offset_string_conversions.cc',
440           'strings/utf_offset_string_conversions.h',
441           'strings/utf_string_conversion_utils.cc',
442           'strings/utf_string_conversion_utils.h',
443           'strings/utf_string_conversions.cc',
444           'strings/utf_string_conversions.h',
445           'supports_user_data.cc',
446           'supports_user_data.h',
447           'synchronization/cancellation_flag.cc',
448           'synchronization/cancellation_flag.h',
449           'synchronization/condition_variable.h',
450           'synchronization/condition_variable_posix.cc',
451           'synchronization/condition_variable_win.cc',
452           'synchronization/lock.cc',
453           'synchronization/lock.h',
454           'synchronization/lock_impl.h',
455           'synchronization/lock_impl_posix.cc',
456           'synchronization/lock_impl_win.cc',
457           'synchronization/spin_wait.h',
458           'synchronization/waitable_event.h',
459           'synchronization/waitable_event_posix.cc',
460           'synchronization/waitable_event_watcher.h',
461           'synchronization/waitable_event_watcher_posix.cc',
462           'synchronization/waitable_event_watcher_win.cc',
463           'synchronization/waitable_event_win.cc',
464           'system_monitor/system_monitor.cc',
465           'system_monitor/system_monitor.h',
466           'sys_byteorder.h',
467           'sys_info.cc',
468           'sys_info.h',
469           'sys_info_android.cc',
470           'sys_info_chromeos.cc',
471           'sys_info_freebsd.cc',
472           'sys_info_ios.mm',
473           'sys_info_linux.cc',
474           'sys_info_mac.cc',
475           'sys_info_openbsd.cc',
476           'sys_info_posix.cc',
477           'sys_info_win.cc',
478           'task_runner.cc',
479           'task_runner.h',
480           'task_runner_util.h',
481           'template_util.h',
482           'thread_task_runner_handle.cc',
483           'thread_task_runner_handle.h',
484           'threading/non_thread_safe.h',
485           'threading/non_thread_safe_impl.cc',
486           'threading/non_thread_safe_impl.h',
487           'threading/platform_thread.h',
488           'threading/platform_thread_android.cc',
489           'threading/platform_thread_linux.cc',
490           'threading/platform_thread_mac.mm',
491           'threading/platform_thread_posix.cc',
492           'threading/platform_thread_win.cc',
493           'threading/post_task_and_reply_impl.cc',
494           'threading/post_task_and_reply_impl.h',
495           'threading/sequenced_worker_pool.cc',
496           'threading/sequenced_worker_pool.h',
497           'threading/simple_thread.cc',
498           'threading/simple_thread.h',
499           'threading/thread.cc',
500           'threading/thread.h',
501           'threading/thread_checker.h',
502           'threading/thread_checker_impl.cc',
503           'threading/thread_checker_impl.h',
504           'threading/thread_collision_warner.cc',
505           'threading/thread_collision_warner.h',
506           'threading/thread_id_name_manager.cc',
507           'threading/thread_id_name_manager.h',
508           'threading/thread_local.h',
509           'threading/thread_local_posix.cc',
510           'threading/thread_local_storage.h',
511           'threading/thread_local_storage_posix.cc',
512           'threading/thread_local_storage_win.cc',
513           'threading/thread_local_win.cc',
514           'threading/thread_restrictions.h',
515           'threading/thread_restrictions.cc',
516           'threading/watchdog.cc',
517           'threading/watchdog.h',
518           'threading/worker_pool.h',
519           'threading/worker_pool.cc',
520           'threading/worker_pool_posix.cc',
521           'threading/worker_pool_posix.h',
522           'threading/worker_pool_win.cc',
523           'time/clock.cc',
524           'time/clock.h',
525           'time/default_clock.cc',
526           'time/default_clock.h',
527           'time/default_tick_clock.cc',
528           'time/default_tick_clock.h',
529           'time/tick_clock.cc',
530           'time/tick_clock.h',
531           # TODO(akalin): Move time* into time/.
532           'time.cc',
533           'time.h',
534           'time_mac.cc',
535           'time_posix.cc',
536           'time_win.cc',
537           'timer.cc',
538           'timer.h',
539           'tracked_objects.cc',
540           'tracked_objects.h',
541           'tracking_info.cc',
542           'tracking_info.h',
543           'tuple.h',
544           'values.cc',
545           'values.h',
546           'value_conversions.cc',
547           'value_conversions.h',
548           'version.cc',
549           'version.h',
550           'vlog.cc',
551           'vlog.h',
552           'nix/mime_util_xdg.cc',
553           'nix/mime_util_xdg.h',
554           'nix/xdg_util.cc',
555           'nix/xdg_util.h',
556           'win/enum_variant.h',
557           'win/enum_variant.cc',
558           'win/event_trace_consumer.h',
559           'win/event_trace_controller.cc',
560           'win/event_trace_controller.h',
561           'win/event_trace_provider.cc',
562           'win/event_trace_provider.h',
563           'win/i18n.cc',
564           'win/i18n.h',
565           'win/iat_patch_function.cc',
566           'win/iat_patch_function.h',
567           'win/iunknown_impl.h',
568           'win/iunknown_impl.cc',
569           'win/metro.cc',
570           'win/metro.h',
571           'win/object_watcher.cc',
572           'win/object_watcher.h',
573           'win/registry.cc',
574           'win/registry.h',
575           'win/resource_util.cc',
576           'win/resource_util.h',
577           'win/sampling_profiler.cc',
578           'win/sampling_profiler.h',
579           'win/scoped_bstr.cc',
580           'win/scoped_bstr.h',
581           'win/scoped_co_mem.h',
582           'win/scoped_com_initializer.h',
583           'win/scoped_comptr.h',
584           'win/scoped_gdi_object.h',
585           'win/scoped_handle.cc',
586           'win/scoped_handle.h',
587           'win/scoped_hdc.h',
588           'win/scoped_hglobal.h',
589           'win/scoped_process_information.cc',
590           'win/scoped_process_information.h',
591           'win/scoped_propvariant.h',
592           'win/scoped_select_object.h',
593           'win/scoped_variant.cc',
594           'win/scoped_variant.h',
595           'win/shortcut.cc',
596           'win/shortcut.h',
597           'win/startup_information.cc',
598           'win/startup_information.h',
599           'win/text_services_message_filter.cc',
600           'win/text_services_message_filter.h',
601           'win/windows_version.cc',
602           'win/windows_version.h',
603           'win/win_util.cc',
604           'win/win_util.h',
605           'win/wrapped_window_proc.cc',
606           'win/wrapped_window_proc.h',
607         ],
608         'conditions': [
609           ['google_tv==1', {
610            'sources': [
611              'android/context_types.cc',
612              'android/context_types.h',
613            ],
614           }],
615         ],
616         'defines': [
617           'BASE_IMPLEMENTATION',
618         ],
619         'include_dirs': [
620           '..',
621         ],
622         'msvs_disabled_warnings': [
623           4018,
624         ],
625         'target_conditions': [
626           ['<(use_glib)==0 or >(nacl_untrusted_build)==1', {
627               'sources/': [
628                 ['exclude', '^nix/'],
629               ],
630               'sources!': [
631                 'atomicops_internals_x86_gcc.cc',
632                 'message_pump_glib.cc',
633                 'message_pump_aurax11.cc',
634               ],
635           }],
636           ['<(toolkit_uses_gtk)==0 or >(nacl_untrusted_build)==1', {
637             'sources!': ['message_pump_gtk.cc'],
638           }],
639           ['(OS != "linux" and <(os_bsd) != 1 and OS != "android") or >(nacl_untrusted_build)==1', {
640               'sources!': [
641                 # Not automatically excluded by the *linux.cc rules.
642                 'linux_util.cc',
643               ],
644             },
645           ],
646           ['>(nacl_untrusted_build)==1', {
647             'sources!': [
648                'allocator/type_profiler_control.cc',
649                'allocator/type_profiler_control.h',
650                'base_paths.cc',
651                'cpu.cc',
652                'debug/stack_trace_posix.cc',
653                'file_util.cc',
654                'file_util_posix.cc',
655                'file_util_proxy.cc',
656                'files/file_path_watcher_kqueue.cc',
657                'memory/shared_memory_posix.cc',
658                'native_library_posix.cc',
659                'path_service.cc',
660                'platform_file_posix.cc',
661                'posix/unix_domain_socket_linux.cc',
662                'process_posix.cc',
663                'process_util.cc',
664                'process_util_posix.cc',
665                'rand_util_posix.cc',
666                'scoped_native_library.cc',
667                'files/scoped_temp_dir.cc',
668                'sys_info_posix.cc',
669                'threading/sequenced_worker_pool.cc',
670                'third_party/dynamic_annotations/dynamic_annotations.c',
671             ],
672             'sources/': [
673               # Metrics won't work in the NaCl sandbox.
674               ['exclude', '^metrics/'],
675               ['include', '^threading/platform_thread_linux\\.cc$'],
676             ],
677           }],
678           ['OS == "android" and >(nacl_untrusted_build)==0', {
679             'sources!': [
680               'base_paths_posix.cc',
681               'files/file_path_watcher_kqueue.cc',
682               'files/file_path_watcher_stub.cc',
683               'power_monitor/power_monitor_posix.cc',
684             ],
685             'sources/': [
686               ['include', '^files/file_path_watcher_linux\\.cc$'],
687               ['include', '^process_util_linux\\.cc$'],
688               ['include', '^process/internal_linux\\.cc$'],
689               ['include', '^process/process_metrics_linux\\.cc$'],
690               ['include', '^posix/unix_domain_socket_linux\\.cc$'],
691               ['include', '^strings/sys_string_conversions_posix\\.cc$'],
692               ['include', '^sys_info_linux\\.cc$'],
693               ['include', '^worker_pool_linux\\.cc$'],
694             ],
695           }],
696           ['OS == "android" and _toolset == "host" and host_os == "linux"', {
697             'sources/': [
698               # Pull in specific files for host builds.
699               ['include', '^threading/platform_thread_linux\\.cc$'],
700             ],
701           }],
702           ['OS == "ios" and _toolset != "host"', {
703             'sources/': [
704               # Pull in specific Mac files for iOS (which have been filtered out
705               # by file name rules).
706               ['include', '^atomicops_internals_mac\\.'],
707               ['include', '^base_paths_mac\\.'],
708               ['include', '^file_util_mac\\.'],
709               ['include', '^file_version_info_mac\\.'],
710               ['include', '^mac/bundle_locations\\.'],
711               ['include', '^mac/foundation_util\\.'],
712               ['include', '^mac/mac_logging\\.'],
713               ['include', '^mac/objc_property_releaser\\.'],
714               ['include', '^mac/scoped_mach_port\\.'],
715               ['include', '^mac/scoped_nsautorelease_pool\\.'],
716               ['include', '^memory/discardable_memory_mac\\.'],
717               ['include', '^message_pump_mac\\.'],
718               ['include', '^threading/platform_thread_mac\\.'],
719               ['include', '^strings/sys_string_conversions_mac\\.'],
720               ['include', '^time_mac\\.'],
721               ['include', '^worker_pool_mac\\.'],
722               # Exclude all process_util except the minimal implementation
723               # needed on iOS (mostly for unit tests).
724               ['exclude', '^process_util'],
725               ['include', '^process_util_ios\\.mm$'],
726             ],
727             'sources!': [
728               'message_pump_libevent.cc'
729             ],
730           }],
731           ['OS == "ios" and _toolset == "host"', {
732             'sources/': [
733               # Copied filename_rules to switch from iOS to Mac inclusions.
734               ['include', '_(cocoa|mac)(_unittest)?\\.(h|cc|mm?)$'],
735               ['include', '(^|/)(cocoa|mac)/'],
736               ['exclude', '_ios(_unittest)?\\.(h|cc|mm?)$'],
737               ['exclude', '(^|/)ios/'],
738             ]
739           }],
740           ['OS != "mac" or >(nacl_untrusted_build)==1', {
741               'sources!': [
742                 'mac/scoped_aedesc.h'
743               ],
744           }],
745           # For now, just test the *BSD platforms enough to exclude them.
746           # Subsequent changes will include them further.
747           ['OS != "freebsd" or >(nacl_untrusted_build)==1', {
748               'sources/': [ ['exclude', '_freebsd\\.cc$'] ],
749             },
750           ],
751           ['OS != "openbsd" or >(nacl_untrusted_build)==1', {
752               'sources/': [ ['exclude', '_openbsd\\.cc$'] ],
753             },
754           ],
755           ['OS != "win" or >(nacl_untrusted_build)==1', {
756               'sources/': [ ['exclude', '^win/'] ],
757             },
758           ],
759           ['OS != "android" or >(nacl_untrusted_build)==1', {
760               'sources/': [ ['exclude', '^android/'] ],
761             },
762           ],
763           ['OS == "win" and >(nacl_untrusted_build)==0', {
764             'include_dirs': [
765               '<(DEPTH)/third_party/wtl/include',
766             ],
767             'sources!': [
768               'event_recorder_stubs.cc',
769               'files/file_path_watcher_kqueue.cc',
770               'files/file_path_watcher_stub.cc',
771               'message_pump_libevent.cc',
772               'posix/file_descriptor_shuffle.cc',
773               # Not using sha1_win.cc because it may have caused a
774               # regression to page cycler moz.
775               'sha1_win.cc',
776               'string16.cc',
777             ],
778           },],
779           ['<(use_ozone) == 1', {
780             'sources!': [
781               'message_pump_glib.cc',
782               'message_pump_aurax11.cc',
783             ]
784           }],
785           ['OS == "linux" and >(nacl_untrusted_build)==0', {
786             'sources!': [
787               'files/file_path_watcher_kqueue.cc',
788               'files/file_path_watcher_stub.cc',
789             ],
790           }],
791           ['(OS == "mac" or OS == "ios") and >(nacl_untrusted_build)==0', {
792             'sources/': [
793               ['exclude', '^files/file_path_watcher_stub\\.cc$'],
794               ['exclude', '^base_paths_posix\\.cc$'],
795               ['exclude', '^native_library_posix\\.cc$'],
796               ['exclude', '^strings/sys_string_conversions_posix\\.cc$'],
797             ],
798           }],
799           ['<(os_bsd)==1 and >(nacl_untrusted_build)==0', {
800             'sources/': [
801               ['exclude', '^files/file_path_watcher_linux\\.cc$'],
802               ['exclude', '^files/file_path_watcher_stub\\.cc$'],
803               ['exclude', '^file_util_linux\\.cc$'],
804               ['exclude', '^process_linux\\.cc$'],
805               ['exclude', '^process_util_linux\\.cc$'],
806               ['exclude', '^sys_info_linux\\.cc$'],
807             ],
808           }],
809           ['<(chromeos)!=1 or >(nacl_untrusted_build)==1', {
810             'sources/': [
811               ['exclude', '^chromeos/'],
812             ],
813           }],
814           # Remove all unnecessary files for build_nexe.py to avoid exceeding
815           # command-line-string limitation when building NaCl on Windows.
816           ['OS == "win" and >(nacl_untrusted_build)==1', {
817               'sources/': [ ['exclude', '\\.h$'] ],
818           }],
819           ['<(use_system_nspr)==1 and >(nacl_untrusted_build)==0', {
820             'sources/': [
821               ['exclude', '^third_party/nspr/'],
822             ],
823           }],
824         ],
825       }],
826     ],
827   },