diff options
author | ncbray <ncbray@chromium.org> | 2015-03-10 15:14:41 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-10 22:15:12 +0000 |
commit | 9099f49130311a760ce3fe88b7782a5574e6ba9d (patch) | |
tree | 5bfc4e33e30b155587305e01dcede670ed80a1fa | |
parent | 659061ebdf5119aff7c12ba135554315aae9ea79 (diff) | |
download | chromium_src-9099f49130311a760ce3fe88b7782a5574e6ba9d.zip chromium_src-9099f49130311a760ce3fe88b7782a5574e6ba9d.tar.gz chromium_src-9099f49130311a760ce3fe88b7782a5574e6ba9d.tar.bz2 |
Fix GN NaCl Debug build of base.
BUG=401761
TBR=brettw
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
Review URL: https://codereview.chromium.org/972203003
Cr-Commit-Position: refs/heads/master@{#319987}
-rw-r--r-- | base/BUILD.gn | 342 | ||||
-rw-r--r-- | base/debug/BUILD.gn | 75 | ||||
-rw-r--r-- | base/json/BUILD.gn | 37 | ||||
-rw-r--r-- | base/memory/BUILD.gn | 81 | ||||
-rw-r--r-- | base/metrics/BUILD.gn | 49 | ||||
-rw-r--r-- | base/process/BUILD.gn | 107 | ||||
-rw-r--r-- | base/test/BUILD.gn | 19 | ||||
-rw-r--r-- | base/third_party/dynamic_annotations/BUILD.gn | 5 | ||||
-rw-r--r-- | base/trace_event/BUILD.gn | 61 | ||||
-rw-r--r-- | build/config/BUILD.gn | 4 | ||||
-rw-r--r-- | build/config/compiler/BUILD.gn | 4 |
11 files changed, 513 insertions, 271 deletions
diff --git a/base/BUILD.gn b/base/BUILD.gn index b34335c..fe0092d 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -9,6 +9,41 @@ if (is_android) { import("//build/config/android/rules.gni") } +source_set("base_paths") { + sources = [ + "base_paths.cc", + "base_paths.h", + "base_paths_android.cc", + "base_paths_android.h", + "base_paths_mac.h", + "base_paths_mac.mm", + "base_paths_posix.cc", + "base_paths_posix.h", + "base_paths_win.cc", + "base_paths_win.h", + ] + + if (is_android || is_mac) { + sources -= [ "base_paths_posix.cc" ] + } + + if (is_nacl) { + sources -= [ + "base_paths.cc", + "base_paths_posix.cc", + ] + } + + defines = [ "BASE_IMPLEMENTATION" ] + + deps = [ + "//base/memory", + "//base/process", + ] + + visibility = [ ":base" ] +} + component("base") { sources = [ "allocator/allocator_extension.cc", @@ -92,16 +127,6 @@ component("base") { "base64.cc", "base64.h", "base_export.h", - "base_paths.cc", - "base_paths.h", - "base_paths_android.cc", - "base_paths_android.h", - "base_paths_mac.h", - "base_paths_mac.mm", - "base_paths_posix.cc", - "base_paths_posix.h", - "base_paths_win.cc", - "base_paths_win.h", "base_switches.h", "basictypes.h", "big_endian.cc", @@ -135,43 +160,6 @@ component("base") { "cpu.h", "critical_closure.h", "critical_closure_internal_ios.mm", - "debug/alias.cc", - "debug/alias.h", - "debug/asan_invalid_access.cc", - "debug/asan_invalid_access.h", - "debug/crash_logging.cc", - "debug/crash_logging.h", - "debug/debugger.cc", - "debug/debugger.h", - "debug/debugger_posix.cc", - "debug/debugger_win.cc", - "debug/dump_without_crashing.cc", - "debug/dump_without_crashing.h", - "debug/gdi_debug_util_win.cc", - "debug/gdi_debug_util_win.h", - "third_party/dmg_fp/dmg_fp.h", - "third_party/dmg_fp/dtoa_wrapper.cc", - "third_party/dmg_fp/g_fmt.cc", - "third_party/icu/icu_utf.cc", - "third_party/icu/icu_utf.h", - "third_party/superfasthash/superfasthash.c", - - # This file depends on files from the "allocator" target, - # but this target does not depend on "allocator" (see - # allocator.gyp for details). - "debug/leak_annotations.h", - "debug/leak_tracker.h", - "debug/proc_maps_linux.cc", - "debug/proc_maps_linux.h", - "debug/profiler.cc", - "debug/profiler.h", - "debug/stack_trace.cc", - "debug/stack_trace.h", - "debug/stack_trace_android.cc", - "debug/stack_trace_posix.cc", - "debug/stack_trace_win.cc", - "debug/task_annotator.cc", - "debug/task_annotator.h", "deferred_sequenced_task_runner.cc", "deferred_sequenced_task_runner.h", "environment.cc", @@ -243,20 +231,6 @@ component("base") { "ios/scoped_critical_action.mm", "ios/weak_nsobject.h", "ios/weak_nsobject.mm", - "json/json_file_value_serializer.cc", - "json/json_file_value_serializer.h", - "json/json_parser.cc", - "json/json_parser.h", - "json/json_reader.cc", - "json/json_reader.h", - "json/json_string_value_serializer.cc", - "json/json_string_value_serializer.h", - "json/json_value_converter.cc", - "json/json_value_converter.h", - "json/json_writer.cc", - "json/json_writer.h", - "json/string_escape.cc", - "json/string_escape.h", "lazy_instance.cc", "lazy_instance.h", "linux_util.cc", @@ -316,46 +290,6 @@ component("base") { "macros.h", "md5.cc", "md5.h", - "memory/aligned_memory.cc", - "memory/aligned_memory.h", - "memory/discardable_memory.cc", - "memory/discardable_memory.h", - "memory/discardable_memory_android.cc", - "memory/discardable_memory_emulated.cc", - "memory/discardable_memory_emulated.h", - "memory/discardable_memory_linux.cc", - "memory/discardable_memory_mac.cc", - "memory/discardable_memory_manager.cc", - "memory/discardable_memory_manager.h", - "memory/discardable_memory_shmem.cc", - "memory/discardable_memory_shmem.h", - "memory/discardable_memory_shmem_allocator.cc", - "memory/discardable_memory_shmem_allocator.h", - "memory/discardable_memory_win.cc", - "memory/discardable_shared_memory.cc", - "memory/discardable_shared_memory.h", - "memory/linked_ptr.h", - "memory/manual_constructor.h", - "memory/memory_pressure_listener.cc", - "memory/memory_pressure_listener.h", - "memory/raw_scoped_refptr_mismatch_checker.h", - "memory/ref_counted.cc", - "memory/ref_counted.h", - "memory/ref_counted_delete_on_message_loop.h", - "memory/ref_counted_memory.cc", - "memory/ref_counted_memory.h", - "memory/scoped_policy.h", - "memory/scoped_ptr.h", - "memory/scoped_vector.h", - "memory/shared_memory.h", - "memory/shared_memory_android.cc", - "memory/shared_memory_nacl.cc", - "memory/shared_memory_posix.cc", - "memory/shared_memory_win.cc", - "memory/singleton.cc", - "memory/singleton.h", - "memory/weak_ptr.cc", - "memory/weak_ptr.h", "message_loop/incoming_task_queue.cc", "message_loop/incoming_task_queue.h", "message_loop/message_loop.cc", @@ -380,33 +314,6 @@ component("base") { "message_loop/message_pump_mac.mm", "message_loop/message_pump_win.cc", "message_loop/message_pump_win.h", - "metrics/bucket_ranges.cc", - "metrics/bucket_ranges.h", - "metrics/field_trial.cc", - "metrics/field_trial.h", - "metrics/histogram.cc", - "metrics/histogram.h", - "metrics/histogram_base.cc", - "metrics/histogram_base.h", - "metrics/histogram_delta_serialization.", - "metrics/histogram_delta_serialization.cc", - "metrics/histogram_flattener.h", - "metrics/histogram_macros.h", - "metrics/histogram_samples.cc", - "metrics/histogram_samples.h", - "metrics/histogram_snapshot_manager.cc", - "metrics/histogram_snapshot_manager.h", - "metrics/sample_map.cc", - "metrics/sample_map.h", - "metrics/sample_vector.cc", - "metrics/sample_vector.h", - "metrics/sparse_histogram.cc", - "metrics/sparse_histogram.h", - "metrics/statistics_recorder.cc", - "metrics/statistics_recorder.h", - "metrics/user_metrics.cc", - "metrics/user_metrics.h", - "metrics/user_metrics_action.h", "move.h", "native_library.h", "native_library_mac.mm", @@ -453,54 +360,6 @@ component("base") { "power_monitor/power_monitor_source.cc", "power_monitor/power_monitor_source.h", "power_monitor/power_observer.h", - "process/internal_linux.cc", - "process/internal_linux.h", - "process/kill.cc", - "process/kill.h", - "process/kill_mac.cc", - "process/kill_posix.cc", - "process/kill_win.cc", - "process/launch.cc", - "process/launch.h", - "process/launch_ios.cc", - "process/launch_mac.cc", - "process/launch_posix.cc", - "process/launch_win.cc", - "process/memory.cc", - "process/memory.h", - "process/memory_linux.cc", - "process/memory_mac.mm", - "process/memory_win.cc", - "process/process.h", - "process/process_handle_freebsd.cc", - "process/process_handle_linux.cc", - "process/process_handle_mac.cc", - "process/process_handle_openbsd.cc", - "process/process_handle_posix.cc", - "process/process_handle_win.cc", - "process/process_info.h", - "process/process_info_linux.cc", - "process/process_info_mac.cc", - "process/process_info_win.cc", - "process/process_iterator.cc", - "process/process_iterator.h", - "process/process_iterator_freebsd.cc", - "process/process_iterator_linux.cc", - "process/process_iterator_mac.cc", - "process/process_iterator_openbsd.cc", - "process/process_iterator_win.cc", - "process/process_linux.cc", - "process/process_metrics.cc", - "process/process_metrics.h", - "process/process_metrics_freebsd.cc", - "process/process_metrics_ios.cc", - "process/process_metrics_linux.cc", - "process/process_metrics_mac.cc", - "process/process_metrics_openbsd.cc", - "process/process_metrics_posix.cc", - "process/process_metrics_win.cc", - "process/process_posix.cc", - "process/process_win.cc", "profiler/alternate_timer.cc", "profiler/alternate_timer.h", "profiler/scoped_profile.cc", @@ -608,6 +467,12 @@ component("base") { "task_runner.h", "task_runner_util.h", "template_util.h", + "third_party/dmg_fp/dmg_fp.h", + "third_party/dmg_fp/dtoa_wrapper.cc", + "third_party/dmg_fp/g_fmt.cc", + "third_party/icu/icu_utf.cc", + "third_party/icu/icu_utf.h", + "third_party/superfasthash/superfasthash.c", "thread_task_runner_handle.cc", "thread_task_runner_handle.h", "threading/non_thread_safe.h", @@ -673,34 +538,6 @@ component("base") { "timer/mock_timer.h", "timer/timer.cc", "timer/timer.h", - "trace_event/memory_dump_manager.cc", - "trace_event/memory_dump_manager.h", - "trace_event/memory_dump_provider.h", - "trace_event/process_memory_dump.cc", - "trace_event/process_memory_dump.h", - "trace_event/process_memory_maps.cc", - "trace_event/process_memory_maps.h", - "trace_event/process_memory_maps_dump_provider.cc", - "trace_event/process_memory_maps_dump_provider.h", - "trace_event/process_memory_totals.cc", - "trace_event/process_memory_totals.h", - "trace_event/process_memory_totals_dump_provider.cc", - "trace_event/process_memory_totals_dump_provider.h", - "trace_event/trace_event.h", - "trace_event/trace_event_android.cc", - "trace_event/trace_event_argument.cc", - "trace_event/trace_event_argument.h", - "trace_event/trace_event_impl.cc", - "trace_event/trace_event_impl.h", - "trace_event/trace_event_impl_constants.cc", - "trace_event/trace_event_memory.cc", - "trace_event/trace_event_memory.h", - "trace_event/trace_event_synthetic_delay.cc", - "trace_event/trace_event_synthetic_delay.h", - "trace_event/trace_event_system_stats_monitor.cc", - "trace_event/trace_event_system_stats_monitor.h", - "trace_event/trace_event_win.cc", - "trace_event/trace_event_win.h", "tracked_objects.cc", "tracked_objects.h", "tracking_info.cc", @@ -765,39 +602,7 @@ component("base") { "win/wrapped_window_proc.h", ] - if (is_nacl) { - # We reset sources_assignment_filter in order to explicitly include - # the linux file (which would otherwise be filtered out). - set_sources_assignment_filter([]) - sources += [ - "files/file_path_watcher_stub.cc", - "sync_socket_nacl.cc", - "threading/platform_thread_linux.cc", - ] - set_sources_assignment_filter(sources_assignment_filter) - - sources -= [ - "allocator/type_profiler_control.cc", - "allocator/type_profiler_control.h", - "async_socket_io_handler_posix.cc", - "base_paths.cc", - "cpu.cc", - "files/file_proxy.cc", - "files/file_util.cc", - "files/file_util_proxy.cc", - "files/scoped_temp_dir.cc", - "path_service.cc", - "scoped_native_library.cc", - ] - } - sources -= [ - "process/process_handle_freebsd.cc", - "process/process_handle_openbsd.cc", - "process/process_iterator_freebsd.cc", - "process/process_iterator_openbsd.cc", - "process/process_metrics_freebsd.cc", - "process/process_metrics_openbsd.cc", "sys_info_freebsd.cc", "sys_info_openbsd.cc", ] @@ -812,6 +617,16 @@ component("base") { "//third_party/modp_b64", ] + public_deps = [ + ":base_paths", + "//base/debug", + "//base/json", + "//base/memory", + "//base/metrics", + "//base/process", + "//base/trace_event", + ] + # Allow more direct string conversions on platforms with native utf8 # strings if (is_mac || is_ios || is_chromeos) { @@ -819,28 +634,13 @@ component("base") { } if (is_android) { - sources += [ - "memory/discardable_memory_ashmem.cc", - "memory/discardable_memory_ashmem.h", - "memory/discardable_memory_ashmem_allocator.cc", - "memory/discardable_memory_ashmem_allocator.h", - ] - sources -= [ - "base_paths_posix.cc", - "power_monitor/power_monitor_device_source_posix.cc", - ] + sources -= [ "power_monitor/power_monitor_device_source_posix.cc" ] # Android uses some Linux sources, put those back. set_sources_assignment_filter([]) sources += [ - "debug/proc_maps_linux.cc", "files/file_path_watcher_linux.cc", "posix/unix_domain_socket_linux.cc", - "process/internal_linux.cc", - "process/memory_linux.cc", - "process/process_handle_linux.cc", - "process/process_iterator_linux.cc", - "process/process_metrics_linux.cc", "sys_info_linux.cc", ] set_sources_assignment_filter(sources_assignment_filter) @@ -853,8 +653,6 @@ component("base") { # logging.cc uses the Android logging library. libs = [ "log" ] - - sources -= [ "debug/stack_trace_posix.cc" ] } if (is_chromeos) { @@ -862,28 +660,41 @@ component("base") { } if (is_nacl) { - # These things would otherwise be built on a Posix build but aren't - # supported on NaCl. + # We reset sources_assignment_filter in order to explicitly include + # the linux file (which would otherwise be filtered out). + set_sources_assignment_filter([]) + sources += [ + "files/file_path_watcher_stub.cc", + "sync_socket_nacl.cc", + "threading/platform_thread_linux.cc", + ] + set_sources_assignment_filter(sources_assignment_filter) + sources -= [ - "debug/stack_trace_posix.cc", + "allocator/type_profiler_control.cc", + "allocator/type_profiler_control.h", + "async_socket_io_handler_posix.cc", + "cpu.cc", "files/file_enumerator_posix.cc", + "files/file_proxy.cc", + "files/file_util.cc", "files/file_util_posix.cc", - "memory/shared_memory_posix.cc", + "files/file_util_proxy.cc", + "files/important_file_writer.cc", + "files/important_file_writer.h", + "files/scoped_temp_dir.cc", "message_loop/message_pump_libevent.cc", - "metrics/field_trial.cc", "native_library_posix.cc", - "process/kill_posix.cc", - "process/launch_posix.cc", - "process/process_metrics_posix.cc", - "process/process_posix.cc", + "path_service.cc", "rand_util_posix.cc", + "scoped_native_library.cc", "sync_socket_posix.cc", + "sys_info.cc", "sys_info_posix.cc", ] } else { # Remove NaCl stuff. sources -= [ - "memory/shared_memory_nacl.cc", "os_compat_nacl.cc", "os_compat_nacl.h", "rand_util_nacl.cc", @@ -927,7 +738,6 @@ component("base") { "memory/discardable_memory_mach.h", ] sources -= [ - "base_paths_posix.cc", "native_library_posix.cc", "strings/sys_string_conversions_posix.cc", ] @@ -990,6 +800,8 @@ component("base") { configs -= [ "//build/config/compiler:optimize" ] configs += [ "//build/config/compiler:optimize_max" ] } + + allow_circular_includes_from = public_deps } # This is the subset of files from base that should not be used with a dynamic diff --git a/base/debug/BUILD.gn b/base/debug/BUILD.gn new file mode 100644 index 0000000..37a0ab2 --- /dev/null +++ b/base/debug/BUILD.gn @@ -0,0 +1,75 @@ +# Copyright (c) 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("debug") { + sources = [ + "alias.cc", + "alias.h", + "asan_invalid_access.cc", + "asan_invalid_access.h", + "crash_logging.cc", + "crash_logging.h", + "debugger.cc", + "debugger.h", + "debugger_posix.cc", + "debugger_win.cc", + "dump_without_crashing.cc", + "dump_without_crashing.h", + "gdi_debug_util_win.cc", + "gdi_debug_util_win.h", + + # This file depends on files from the "allocator" target, + # but this target does not depend on "allocator" (see + # allocator.gyp for details). + "leak_annotations.h", + "leak_tracker.h", + "proc_maps_linux.cc", + "proc_maps_linux.h", + "profiler.cc", + "profiler.h", + "stack_trace.cc", + "stack_trace.h", + "stack_trace_android.cc", + "stack_trace_posix.cc", + "stack_trace_win.cc", + "task_annotator.cc", + "task_annotator.h", + ] + + if (is_android) { + # Android uses some Linux sources, put those back. + set_sources_assignment_filter([]) + sources += [ "proc_maps_linux.cc" ] + set_sources_assignment_filter(sources_assignment_filter) + + sources -= [ "stack_trace_posix.cc" ] + } + + if (is_nacl) { + sources -= [ + "crash_logging.cc", + "crash_logging.h", + "stack_trace.cc", + "stack_trace_posix.cc", + ] + } + + defines = [ "BASE_IMPLEMENTATION" ] + + deps = [ + "//base/memory", + "//base/process", + ] + + if (is_linux) { + deps += [ "//base/third_party/symbolize" ] + } + + allow_circular_includes_from = [ + "//base/memory", + "//base/process", + ] + + visibility = [ "//base/*" ] +} diff --git a/base/json/BUILD.gn b/base/json/BUILD.gn new file mode 100644 index 0000000..0310ea9 --- /dev/null +++ b/base/json/BUILD.gn @@ -0,0 +1,37 @@ +# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("json") { + sources = [ + "json_file_value_serializer.cc", + "json_file_value_serializer.h", + "json_parser.cc", + "json_parser.h", + "json_reader.cc", + "json_reader.h", + "json_string_value_serializer.cc", + "json_string_value_serializer.h", + "json_value_converter.cc", + "json_value_converter.h", + "json_writer.cc", + "json_writer.h", + "string_escape.cc", + "string_escape.h", + ] + + if (is_nacl) { + sources -= [ + "json_file_value_serializer.cc", + "json_file_value_serializer.h", + ] + } + + defines = [ "BASE_IMPLEMENTATION" ] + + deps = [ + "//base/memory", + ] + + visibility = [ "//base/*" ] +} diff --git a/base/memory/BUILD.gn b/base/memory/BUILD.gn new file mode 100644 index 0000000..561e5cd --- /dev/null +++ b/base/memory/BUILD.gn @@ -0,0 +1,81 @@ +# Copyright (c) 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("memory") { + sources = [ + "aligned_memory.cc", + "aligned_memory.h", + "discardable_memory.cc", + "discardable_memory.h", + "discardable_memory_android.cc", + "discardable_memory_emulated.cc", + "discardable_memory_emulated.h", + "discardable_memory_linux.cc", + "discardable_memory_mac.cc", + "discardable_memory_manager.cc", + "discardable_memory_manager.h", + "discardable_memory_shmem.cc", + "discardable_memory_shmem.h", + "discardable_memory_shmem_allocator.cc", + "discardable_memory_shmem_allocator.h", + "discardable_memory_win.cc", + "discardable_shared_memory.cc", + "discardable_shared_memory.h", + "linked_ptr.h", + "manual_constructor.h", + "memory_pressure_listener.cc", + "memory_pressure_listener.h", + "raw_scoped_refptr_mismatch_checker.h", + "ref_counted.cc", + "ref_counted.h", + "ref_counted_delete_on_message_loop.h", + "ref_counted_memory.cc", + "ref_counted_memory.h", + "scoped_policy.h", + "scoped_ptr.h", + "scoped_vector.h", + "shared_memory.h", + "shared_memory_android.cc", + "shared_memory_nacl.cc", + "shared_memory_posix.cc", + "shared_memory_win.cc", + "singleton.cc", + "singleton.h", + "weak_ptr.cc", + "weak_ptr.h", + ] + + if (is_android) { + sources += [ + "discardable_memory_ashmem.cc", + "discardable_memory_ashmem.h", + "discardable_memory_ashmem_allocator.cc", + "discardable_memory_ashmem_allocator.h", + ] + } + + if (is_nacl) { + sources -= [ + "discardable_memory.cc", + "discardable_memory.h", + "discardable_memory_emulated.cc", + "discardable_memory_emulated.h", + "discardable_memory_manager.cc", + "discardable_memory_manager.h", + "discardable_memory_shmem.cc", + "discardable_memory_shmem.h", + "discardable_memory_shmem_allocator.cc", + "discardable_memory_shmem_allocator.h", + "discardable_shared_memory.cc", + "discardable_shared_memory.h", + "shared_memory_posix.cc", + ] + } else { + sources -= [ "shared_memory_nacl.cc" ] + } + + defines = [ "BASE_IMPLEMENTATION" ] + + visibility = [ "//base/*" ] +} diff --git a/base/metrics/BUILD.gn b/base/metrics/BUILD.gn new file mode 100644 index 0000000..804e59b --- /dev/null +++ b/base/metrics/BUILD.gn @@ -0,0 +1,49 @@ +# Copyright (c) 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("metrics") { + sources = [ + "bucket_ranges.cc", + "bucket_ranges.h", + "field_trial.cc", + "field_trial.h", + "histogram.cc", + "histogram.h", + "histogram_base.cc", + "histogram_base.h", + "histogram_delta_serialization.", + "histogram_delta_serialization.cc", + "histogram_flattener.h", + "histogram_macros.h", + "histogram_samples.cc", + "histogram_samples.h", + "histogram_snapshot_manager.cc", + "histogram_snapshot_manager.h", + "sample_map.cc", + "sample_map.h", + "sample_vector.cc", + "sample_vector.h", + "sparse_histogram.cc", + "sparse_histogram.h", + "statistics_recorder.cc", + "statistics_recorder.h", + "user_metrics.cc", + "user_metrics.h", + "user_metrics_action.h", + ] + + if (is_nacl) { + sources -= [ "field_trial.cc" ] + } + + defines = [ "BASE_IMPLEMENTATION" ] + + deps = [ + "//base/debug", + "//base/json", + "//base/memory", + ] + + visibility = [ "//base/*" ] +} diff --git a/base/process/BUILD.gn b/base/process/BUILD.gn new file mode 100644 index 0000000..125b451 --- /dev/null +++ b/base/process/BUILD.gn @@ -0,0 +1,107 @@ +# Copyright (c) 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("process") { + sources = [ + "internal_linux.cc", + "internal_linux.h", + "kill.cc", + "kill.h", + "kill_mac.cc", + "kill_posix.cc", + "kill_win.cc", + "launch.cc", + "launch.h", + "launch_ios.cc", + "launch_mac.cc", + "launch_posix.cc", + "launch_win.cc", + "memory.cc", + "memory.h", + "memory_linux.cc", + "memory_mac.mm", + "memory_win.cc", + "process.h", + "process_handle_freebsd.cc", + "process_handle_linux.cc", + "process_handle_mac.cc", + "process_handle_openbsd.cc", + "process_handle_posix.cc", + "process_handle_win.cc", + "process_info.h", + "process_info_linux.cc", + "process_info_mac.cc", + "process_info_win.cc", + "process_iterator.cc", + "process_iterator.h", + "process_iterator_freebsd.cc", + "process_iterator_linux.cc", + "process_iterator_mac.cc", + "process_iterator_openbsd.cc", + "process_iterator_win.cc", + "process_linux.cc", + "process_metrics.cc", + "process_metrics.h", + "process_metrics_freebsd.cc", + "process_metrics_ios.cc", + "process_metrics_linux.cc", + "process_metrics_mac.cc", + "process_metrics_openbsd.cc", + "process_metrics_posix.cc", + "process_metrics_win.cc", + "process_posix.cc", + "process_win.cc", + ] + + sources -= [ + "process_handle_freebsd.cc", + "process_handle_openbsd.cc", + "process_iterator_freebsd.cc", + "process_iterator_openbsd.cc", + "process_metrics_freebsd.cc", + "process_metrics_openbsd.cc", + ] + + if (is_android) { + # Android uses some Linux sources, put those back. + set_sources_assignment_filter([]) + sources += [ + "internal_linux.cc", + "memory_linux.cc", + "process_handle_linux.cc", + "process_iterator_linux.cc", + "process_metrics_linux.cc", + ] + set_sources_assignment_filter(sources_assignment_filter) + } + + if (is_nacl) { + sources -= [ + "kill.cc", + "kill.h", + "kill_posix.cc", + "launch.cc", + "launch.h", + "launch_posix.cc", + "memory.cc", + "memory.h", + "process_iterator.cc", + "process_iterator.h", + "process_metrics.cc", + "process_metrics_posix.cc", + "process_posix.cc", + ] + } + + defines = [ "BASE_IMPLEMENTATION" ] + + deps = [ + "//base/memory", + "//base/third_party/dynamic_annotations", + ] + + allow_circular_includes_from = [ "//base/memory" ] + + visibility = [ "//base/*" ] +} diff --git a/base/test/BUILD.gn b/base/test/BUILD.gn index 120159e..55e710d 100644 --- a/base/test/BUILD.gn +++ b/base/test/BUILD.gn @@ -8,6 +8,20 @@ if (is_android) { import("//build/config/android/rules.gni") } +source_set("test_config") { + # TODO http://crbug.com/412064 enable this flag all the time. + testonly = !is_component_build + sources = [ + "test_switches.cc", + "test_switches.h", + "test_timeouts.cc", + "test_timeouts.h", + ] + deps = [ + "//base", + ] +} + # GYP: //base/base.gyp:test_support_base source_set("test_support") { # TODO http://crbug.com/412064 enable this flag all the time. @@ -94,10 +108,6 @@ source_set("test_support") { "test_support_android.h", "test_support_ios.h", "test_support_ios.mm", - "test_switches.cc", - "test_switches.h", - "test_timeouts.cc", - "test_timeouts.h", "thread_test_helper.cc", "thread_test_helper.h", "trace_event_analyzer.cc", @@ -109,6 +119,7 @@ source_set("test_support") { ] public_deps = [ + ":test_config", "//base", "//base:i18n", "//base:base_static", diff --git a/base/third_party/dynamic_annotations/BUILD.gn b/base/third_party/dynamic_annotations/BUILD.gn index d6a5123..bc324ae 100644 --- a/base/third_party/dynamic_annotations/BUILD.gn +++ b/base/third_party/dynamic_annotations/BUILD.gn @@ -6,7 +6,10 @@ if (is_nacl) { # Native client doesn't need dynamic annotations, so we provide a # dummy target in order for clients to not have to special-case the # dependency. - group("dynamic_annotations") { + source_set("dynamic_annotations") { + sources = [ + "dynamic_annotations.h", + ] } } else { source_set("dynamic_annotations") { diff --git a/base/trace_event/BUILD.gn b/base/trace_event/BUILD.gn new file mode 100644 index 0000000..eec607b --- /dev/null +++ b/base/trace_event/BUILD.gn @@ -0,0 +1,61 @@ +# Copyright (c) 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("trace_event") { + sources = [ + "memory_dump_manager.cc", + "memory_dump_manager.h", + "memory_dump_provider.h", + "process_memory_dump.cc", + "process_memory_dump.h", + "process_memory_maps.cc", + "process_memory_maps.h", + "process_memory_maps_dump_provider.cc", + "process_memory_maps_dump_provider.h", + "process_memory_totals.cc", + "process_memory_totals.h", + "process_memory_totals_dump_provider.cc", + "process_memory_totals_dump_provider.h", + "trace_event.h", + "trace_event_android.cc", + "trace_event_argument.cc", + "trace_event_argument.h", + "trace_event_impl.cc", + "trace_event_impl.h", + "trace_event_impl_constants.cc", + "trace_event_memory.cc", + "trace_event_memory.h", + "trace_event_synthetic_delay.cc", + "trace_event_synthetic_delay.h", + "trace_event_system_stats_monitor.cc", + "trace_event_system_stats_monitor.h", + "trace_event_win.cc", + "trace_event_win.h", + ] + + if (is_nacl) { + sources -= [ + "process_memory_totals_dump_provider.cc", + "trace_event_system_stats_monitor.cc", + ] + } + + defines = [ "BASE_IMPLEMENTATION" ] + + deps = [ + "//base/debug", + "//base/json", + "//base/memory", + "//base/process", + "//base/third_party/dynamic_annotations", + ] + + allow_circular_includes_from = [ + "//base/debug", + "//base/memory", + "//base/process", + ] + + visibility = [ "//base/*" ] +} diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 7d7a56c..15441a9 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -236,6 +236,10 @@ config("debug") { "WTF_USE_DYNAMIC_ANNOTATIONS=1", ] + if (is_nacl) { + defines += [ "DYNAMIC_ANNOTATIONS_PREFIX=NACL_" ] + } + if (is_win) { if (disable_iterator_debugging) { # Iterator debugging is enabled by the compiler on debug builds, and we diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 0145175..c89b09a0 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -157,7 +157,7 @@ config("compiler") { ] } - if (is_clang && !is_win) { + if (is_clang && !is_win && !is_nacl) { # This is here so that all files get recompiled after a clang roll and # when turning clang on or off. (defines are passed via the command line, # and build system rebuild things when their commandline changes). Nothing @@ -726,6 +726,7 @@ config("default_warnings") { if (is_win) { cflags = [ "/WX", # Treat warnings as errors. + # Warnings permanently disabled: # TODO(GYP) The GYP build doesn't have this globally enabled but disabled @@ -780,6 +781,7 @@ config("default_warnings") { # have to turn off this warning (and be careful about how object # destruction happens in such cases). "/wd4611", + # Warnings to evaluate and possibly fix/reenable later: "/wd4100", # Unreferenced formal function parameter. |