| Index: components/tracing/BUILD.gn
|
| diff --git a/components/tracing/BUILD.gn b/components/tracing/BUILD.gn
|
| index 1871b56cc1b42e19132f58d127de2eb0a94149af..52926f4df433c43b1fb82307a88f6dc19bdcb007 100644
|
| --- a/components/tracing/BUILD.gn
|
| +++ b/components/tracing/BUILD.gn
|
| @@ -23,6 +23,8 @@ component("tracing") {
|
| "core/proto_zero_message_handle.h",
|
| "core/scattered_stream_writer.cc",
|
| "core/scattered_stream_writer.h",
|
| + "core/trace_buffer_writer.cc",
|
| + "core/trace_buffer_writer.h",
|
| "core/trace_ring_buffer.cc",
|
| "core/trace_ring_buffer.h",
|
| "tracing_export.h",
|
| @@ -31,6 +33,7 @@ component("tracing") {
|
| defines = [ "TRACING_IMPLEMENTATION" ]
|
|
|
| deps = [
|
| + ":tracing_protos",
|
| "//base",
|
| "//ipc",
|
| ]
|
| @@ -100,12 +103,14 @@ source_set("unit_tests") {
|
| "core/proto_utils_unittest.cc",
|
| "core/proto_zero_message_unittest.cc",
|
| "core/scattered_stream_writer_unittest.cc",
|
| + "core/trace_buffer_writer_unittest.cc",
|
| "core/trace_ring_buffer_unittest.cc",
|
| "test/fake_scattered_buffer.cc",
|
| "test/proto_zero_generation_unittest.cc",
|
| ]
|
|
|
| deps = [
|
| + ":golden_protos_for_tests",
|
| ":proto_zero_testing_messages",
|
| ":tracing",
|
| "//base/test:test_support",
|
| @@ -119,3 +124,44 @@ source_set("unit_tests") {
|
| deps += [ ":startup_tracing" ]
|
| }
|
| }
|
| +
|
| +proto_library("golden_protos_for_tests") {
|
| + visibility = [ ":unit_tests" ]
|
| + proto_out_dir = "components/tracing/test/golden_protos"
|
| + sources = [
|
| + "proto/events_chunk.proto",
|
| + ]
|
| +}
|
| +
|
| +proto_library("tracing_protos") {
|
| + visibility = [ "//components/tracing/*" ]
|
| +
|
| + sources = [
|
| + "proto/event.proto",
|
| + "proto/event_args_for_testing.proto",
|
| + "proto/events_chunk.proto",
|
| + ]
|
| +
|
| + generator_plugin_label = "tools/proto_zero_plugin:proto_zero_plugin"
|
| + generator_plugin_suffix = ".pbzero"
|
| + generate_cc = false
|
| + generate_python = false
|
| +
|
| + # TODO(kraynov) Move away this complex path evaluation and dependency
|
| + # injection to proto_library.gni. All lines below should be removed.
|
| + # The problem is that root_out_dir and root_build_dir may differ in case of
|
| + # cross compilation. Also .exe will be appended on Windows.
|
| +
|
| + plugin_host_label = generator_plugin_label + "($host_toolchain)"
|
| + generator_plugin =
|
| + rebase_path(get_label_info(plugin_host_label, "root_out_dir") + "/" +
|
| + get_label_info(plugin_host_label, "name"),
|
| + root_build_dir)
|
| + if (is_win) {
|
| + generator_plugin += ".exe"
|
| + }
|
| +
|
| + deps = [
|
| + plugin_host_label,
|
| + ]
|
| +}
|
|
|