diff --git a/gn/proto_library.gni b/gn/proto_library.gni index bb55e77a47..2865fe2626 100644 --- a/gn/proto_library.gni +++ b/gn/proto_library.gni @@ -369,7 +369,7 @@ template("perfetto_proto_library") { rebase_path(invoker.generate_descriptor, proto_path) deps = deps_ import_dirs = import_dirs_ - forward_variables_from(invoker, vars_to_forward) + forward_variables_from(invoker, vars_to_forward + [ "proto_deps" ]) } # Not needed for descriptor proto_library target. diff --git a/gn/standalone/proto_library.gni b/gn/standalone/proto_library.gni index 2b67ea2c1e..0fb119a5eb 100644 --- a/gn/standalone/proto_library.gni +++ b/gn/standalone/proto_library.gni @@ -304,4 +304,5 @@ template("proto_library") { } } # source_set(source_set_name) } + not_needed(invoker, ["proto_deps"]) } # template diff --git a/protos/perfetto/trace/track_event/BUILD.gn b/protos/perfetto/trace/track_event/BUILD.gn index abb9a7647f..0d2749b286 100644 --- a/protos/perfetto/trace/track_event/BUILD.gn +++ b/protos/perfetto/trace/track_event/BUILD.gn @@ -46,9 +46,42 @@ perfetto_proto_library("@TYPE@") { ] } +config("descriptor_inputs_config") { + inputs = [ + "debug_annotation.proto", + "log_message.proto", + "task_execution.proto", + "chrome_active_processes.proto", + "chrome_application_state_info.proto", + "chrome_compositor_scheduler_state.proto", + "chrome_content_settings_event_info.proto", + "chrome_frame_reporter.proto", + "chrome_histogram_sample.proto", + "chrome_keyed_service.proto", + "chrome_latency_info.proto", + "chrome_legacy_ipc.proto", + "chrome_message_pump.proto", + "chrome_mojo_event_info.proto", + "chrome_renderer_scheduler_state.proto", + "chrome_user_event.proto", + "chrome_window_handle_event_info.proto", + "screenshot.proto", + "source_location.proto", + ] +} + +group("descriptor_inputs") { + public_configs = [ ":descriptor_inputs_config" ] +} + perfetto_proto_library("descriptor") { proto_generators = [ "descriptor" ] generate_descriptor = "track_event.descriptor" sources = [ "track_event.proto" ] + + # TODO(lalitm): remove this target when we found better way to propagate + # indirect input deps. + proto_deps = [ ":descriptor_inputs" ] + link_deps = [ ":source_set" ] } diff --git a/protos/third_party/chromium/BUILD.gn b/protos/third_party/chromium/BUILD.gn index ef1e18a6a3..4cd5d12ea8 100644 --- a/protos/third_party/chromium/BUILD.gn +++ b/protos/third_party/chromium/BUILD.gn @@ -7,10 +7,44 @@ perfetto_proto_library("@TYPE@") { public_deps = [ "../../perfetto/trace/track_event:@TYPE@" ] } +config("descriptor_inputs_config") { + inputs = [ + "../../perfetto/trace/track_event/track_event.proto", + "../../perfetto/trace/track_event/debug_annotation.proto", + "../../perfetto/trace/track_event/source_location.proto", + "../../perfetto/trace/track_event/log_message.proto", + "../../perfetto/trace/track_event/task_execution.proto", + "../../perfetto/trace/track_event/chrome_active_processes.proto", + "../../perfetto/trace/track_event/chrome_application_state_info.proto", + "../../perfetto/trace/track_event/chrome_compositor_scheduler_state.proto", + "../../perfetto/trace/track_event/chrome_content_settings_event_info.proto", + "../../perfetto/trace/track_event/chrome_frame_reporter.proto", + "../../perfetto/trace/track_event/chrome_histogram_sample.proto", + "../../perfetto/trace/track_event/chrome_keyed_service.proto", + "../../perfetto/trace/track_event/chrome_latency_info.proto", + "../../perfetto/trace/track_event/chrome_legacy_ipc.proto", + "../../perfetto/trace/track_event/chrome_message_pump.proto", + "../../perfetto/trace/track_event/chrome_mojo_event_info.proto", + "../../perfetto/trace/track_event/chrome_renderer_scheduler_state.proto", + "../../perfetto/trace/track_event/chrome_user_event.proto", + "../../perfetto/trace/track_event/chrome_window_handle_event_info.proto", + "../../perfetto/trace/track_event/screenshot.proto", + ] +} + +group("descriptor_inputs") { + public_configs = [ ":descriptor_inputs_config" ] +} + perfetto_proto_library("@TYPE@") { proto_generators = [ "descriptor" ] sources = chrome_track_event_sources generate_descriptor = "chrome_track_event.descriptor" + + # TODO(lalitm): remove this target when we found better way to propagate + # indirect input deps. + proto_deps = [ ":descriptor_inputs" ] + link_deps = [ ":source_set" ] # When rolled into Chrome, extension descriptor is going to be linked into