Support building traced on the host for Android
This is hopefully a step toward testing performance of Android
executables that run on the host (e.g. crosvm).
Bug: b/283171575
Test: -
$ tools/install-build-deps --android
$ tools/gen_android_bp
$ m traced
Change-Id: Ife8224a2978ab1b1250cd295283c22702b792ad6
diff --git a/Android.bp b/Android.bp
index f4f9a2d..5a3186d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -13095,15 +13095,22 @@
"src/traced/service/main.cc",
],
shared_libs: [
- "liblog",
"libperfetto",
],
+ host_supported: true,
init_rc: [
"perfetto.rc",
],
defaults: [
"perfetto_defaults",
],
+ target: {
+ android: {
+ shared_libs: [
+ "liblog",
+ ],
+ },
+ },
}
// GN: //src/profiling/perf:traced_perf
diff --git a/tools/gen_android_bp b/tools/gen_android_bp
index 5317914..179ac14 100755
--- a/tools/gen_android_bp
+++ b/tools/gen_android_bp
@@ -103,6 +103,7 @@
'//protos/perfetto/trace:perfetto_trace_protos',
'//src/trace_processor:demangle',
'//src/trace_processor:trace_processor_shell',
+ '//src/traced/service:traced',
]
target_vendor_available = [