Merge "perfetto: fix dependencies for perfetto binary on standalone android"
diff --git a/Android.bp b/Android.bp
index 8a7eb3f..bee9d52 100644
--- a/Android.bp
+++ b/Android.bp
@@ -275,6 +275,7 @@
cflags: [
"-DGOOGLE_PROTOBUF_NO_RTTI",
"-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
+ "-DPERFETTO_BUILD_WITH_ANDROID",
],
product_variables: {
pdk: {
diff --git a/BUILD.gn b/BUILD.gn
index 6b38d69..4995177 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -87,6 +87,9 @@
"src/ftrace_reader:ftrace_reader_integrationtests",
"test:end_to_end_integrationtests",
]
+ if (build_with_android) {
+ cflags = [ "-DPERFETTO_BUILD_WITH_ANDROID" ]
+ }
}
if (monolithic_binaries) {
@@ -138,9 +141,11 @@
sources = [
"src/traced/perfetto_cmd/main.cc",
]
+ if (is_android) {
+ deps += [ "src/base:android_task_runner" ]
+ }
if (build_with_android) {
cflags = [ "-DPERFETTO_BUILD_WITH_ANDROID" ]
- deps += [ "src/base:android_task_runner" ]
libs = [
"binder",
"services",