Support a build flag to optimize binary size Introduce build flag `enable_perfetto_system_consumer` which allows excluding only the consumer portion of the SDK's system backend.. When this flag is set to false, the binary size is reduced by ~300 KB. Chrome on Android isn't allowed to start system tracing sessions, so there's no point including consumer IPC code in the Chrome binary. As a result, we don't need consumer_ipc in system backend. Hence, in those cases, we could save the binary size by not including the consumer_ipc. Change-Id: Iccc737c66e9d97f80b2d75f9e6933fec32c807ff
diff --git a/gn/perfetto_integrationtests.gni b/gn/perfetto_integrationtests.gni index 9657a3d..2001d34 100644 --- a/gn/perfetto_integrationtests.gni +++ b/gn/perfetto_integrationtests.gni
@@ -19,7 +19,7 @@ "src/tracing/test:client_api_integrationtests", ] -if (enable_perfetto_ipc) { +if (enable_perfetto_ipc && enable_perfetto_system_consumer) { perfetto_integrationtests_targets += [ "src/tracing/test:tracing_integration_test" ] }