tp: move metrics descriptor generation to build time
This is necessary because generating the descriptor at check-in time was
leading to conflicts in G3 where the third_party/perfetto prefix is
present for extensions defined in Google3 but not the builtin
descriptors.
This CL ensures that wherever we build, we get a consistent generation
of the builtin metric descriptor.
Change-Id: I94be63dae7960edc8aabac8f47686a82daa4796e
diff --git a/BUILD.extras b/BUILD.extras
index d7c711b..83a17f0 100644
--- a/BUILD.extras
+++ b/BUILD.extras
@@ -22,6 +22,15 @@
python_version = "PY3",
)
+perfetto_py_binary(
+ name = "gen_cc_proto_descriptor_py",
+ srcs = [
+ "tools/gen_cc_proto_descriptor.py",
+ ],
+ main = "tools/gen_cc_proto_descriptor.py",
+ python_version = "PY3",
+)
+
perfetto_java_proto_library(
name = "protos_perfetto_metrics_java",
deps = [