tp: add support for shell on Android

Change-Id: I2ee77c8501b4bfe4b840de0d38c776ef273cc2b8
diff --git a/Android.bp b/Android.bp
index 2a49391..3b43dbd 100644
--- a/Android.bp
+++ b/Android.bp
@@ -495,9 +495,6 @@
     ":perfetto_src_tracing_ipc_producer_producer",
     ":perfetto_src_tracing_ipc_service_service",
   ],
-  shared_libs: [
-    "liblog",
-  ],
   host_supported: true,
   export_include_dirs: [
     "include",
@@ -553,6 +550,13 @@
     "-DGOOGLE_PROTOBUF_NO_RTTI",
     "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
   ],
+  target: {
+    android: {
+      shared_libs: [
+        "liblog",
+      ],
+    },
+  },
 }
 
 // GN: //src/android_internal:libperfetto_android_internal
@@ -8125,11 +8129,14 @@
     ":perfetto_tools_sanitizers_unittests_sanitizers_unittests",
   ],
   shared_libs: [
+    "libandroidicu",
     "libbase",
     "liblog",
     "libprocinfo",
     "libprotobuf-cpp-lite",
+    "libsqlite",
     "libunwindstack",
+    "libutils",
     "libz",
   ],
   static_libs: [
@@ -8228,21 +8235,6 @@
     "src/traced/probes/filesystem/testdata/**/*",
     "src/traced/probes/ftrace/test/data/**/*",
   ],
-  target: {
-    android: {
-      shared_libs: [
-        "libandroidicu",
-        "liblog",
-        "libsqlite",
-        "libutils",
-      ],
-    },
-    host: {
-      static_libs: [
-        "libsqlite",
-      ],
-    },
-  },
 }
 
 // GN: //src/protozero/protoc_plugin:protozero_plugin
@@ -8267,7 +8259,7 @@
 }
 
 // GN: //src/trace_processor:trace_processor_shell
-cc_binary_host {
+cc_binary {
   name: "trace_processor_shell",
   srcs: [
     ":perfetto_include_perfetto_base_base",
@@ -8331,11 +8323,7 @@
     "src/trace_processor/trace_processor_shell.cc",
     "src/trace_processor/util/proto_to_json.cc",
   ],
-  static_libs: [
-    "libprotobuf-cpp-full",
-    "libsqlite",
-    "libz",
-  ],
+  host_supported: true,
   generated_headers: [
     "perfetto_protos_perfetto_common_zero_gen_headers",
     "perfetto_protos_perfetto_config_android_zero_gen_headers",
@@ -8377,7 +8365,26 @@
     "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
     "-DHAVE_HIDDEN",
   ],
-  stl: "libc++_static",
+  target: {
+    android: {
+      shared_libs: [
+        "libandroidicu",
+        "liblog",
+        "libprotobuf-cpp-full",
+        "libsqlite",
+        "libutils",
+        "libz",
+      ],
+    },
+    host: {
+      static_libs: [
+        "libprotobuf-cpp-full",
+        "libsqlite",
+        "libz",
+      ],
+      stl: "libc++_static",
+    },
+  },
 }
 
 // GN: //tools/trace_to_text:trace_to_text