Disable merged_trace_lite target in most configurations
The merged_trace_lite target is not really needed. We just build it to
make sure that the generated merged proto can be compiled as a C++ lite
proto.
The merged_trace_lite can take up to a couple of minutes to build with
optimizations. From a recent CI run:
```
[00:06:08] [3433/3437] link ./perfetto_integrationtests
[00:08:54] [3434/3437] compile gen/protos/perfetto/trace/perfetto_trace.pb.cc
[00:08:54] [3435/3437] stamp obj/protos/perfetto/trace/merged_trace_lite.stamp
```
Let's keep the target only on CI debug builds and remove it from
everything else (other CI builds, local dev builds and chromium builds,
which include every target).
Change-Id: I5c4810eecef696c4b020cd02c0a8d9d8e7423c9a
diff --git a/BUILD.gn b/BUILD.gn
index 1e61d67..a6acff1 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -166,9 +166,6 @@
# Used to evaluate the Python folder for Bazel script generation.
"python:trace_processor_py",
- # For syntax-checking the protos.
- "protos/perfetto/trace:merged_trace_lite",
-
# For checking all generated xxx.gen.{cc,h} files without waiting for
# embedders to try to use them and fail.
"protos/perfetto/config:cpp",
@@ -185,6 +182,11 @@
}
}
+if (enable_perfetto_merged_protos_check) {
+ # For syntax-checking the protos.
+ all_targets += [ "protos/perfetto/trace:merged_trace_lite" ]
+}
+
# The CTS code is built (but not ran) also in standalone builds. This is to
# catch refactoring breakages earlier without having to wait for treehugger.
if (is_android && (perfetto_build_standalone || perfetto_build_with_android)) {