Add a way to use libraries from the Android tree
This patch adds a gn variable build_with_android which makes it possible
to use Android internal (i.e., non-NDK) libraries when Perfetto is being
built as a part of the Android tree.
Change-Id: I935582fa969ab230b9ab0ac7d392dfeace802b0e
diff --git a/BUILD.gn b/BUILD.gn
index 512934e..1996c66 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -66,6 +66,10 @@
"src/traced/probes",
"src/traced/service",
]
+ if (build_with_android) {
+ cflags = [ "-DPERFETTO_BUILD_WITH_ANDROID" ]
+ libs = [ "utils" ]
+ }
}
# The unprivileged trace daemon that listens for Producer and Consumer