Use Soong to strip and dist trace_processor on host.
This uses build/soong change 2254cffd5380df7fda2d3eee0cf6e800ba5219c7.
Test: make trace_processor_shell
Change-Id: I3c9f7320fa2bd5f5ad16a1e6b68d20bc7bf53dac
diff --git a/Android.bp b/Android.bp
index 77fad2b..3289c41 100644
--- a/Android.bp
+++ b/Android.bp
@@ -8731,6 +8731,14 @@
"libz",
],
stl: "libc++_static",
+ dist: {
+ targets: [
+ "sdk_repo",
+ ],
+ },
+ strip: {
+ all: true,
+ },
},
},
}
@@ -9250,29 +9258,3 @@
"statslog_perfetto.cpp",
],
}
-
-cc_genrule {
- name: "trace_processor_shell.stripped",
- device_supported: false,
- host_supported: true,
- cmd: "$(location tools/strip_android_host_binary.py) $(in) -o $(out)",
- enabled: false,
- compile_multilib: "64",
- tool_files: [
- "tools/strip_android_host_binary.py",
- ],
- dist: {
- targets: [
- "sdk_repo",
- ],
- },
- target: {
- linux: {
- out: [
- "trace_processor_shell.stripped",
- ],
- srcs: [":trace_processor_shell"],
- enabled: true,
- },
- },
-}
diff --git a/Android.bp.extras b/Android.bp.extras
index a4615eb..65a81f4 100644
--- a/Android.bp.extras
+++ b/Android.bp.extras
@@ -78,29 +78,3 @@
"statslog_perfetto.cpp",
],
}
-
-cc_genrule {
- name: "trace_processor_shell.stripped",
- device_supported: false,
- host_supported: true,
- cmd: "$(location tools/strip_android_host_binary.py) $(in) -o $(out)",
- enabled: false,
- compile_multilib: "64",
- tool_files: [
- "tools/strip_android_host_binary.py",
- ],
- dist: {
- targets: [
- "sdk_repo",
- ],
- },
- target: {
- linux: {
- out: [
- "trace_processor_shell.stripped",
- ],
- srcs: [":trace_processor_shell"],
- enabled: true,
- },
- },
-}
diff --git a/tools/gen_android_bp b/tools/gen_android_bp
index 911973c..b1432c2 100755
--- a/tools/gen_android_bp
+++ b/tools/gen_android_bp
@@ -205,7 +205,9 @@
'libperfetto_android_internal': [('static_libs', {'libhealthhalutils'}),],
'trace_processor_shell': [
('host', {
- 'stl': 'libc++_static'
+ 'stl': 'libc++_static',
+ 'strip': {'all': True},
+ 'dist': {'targets': ['sdk_repo']},
}),
],
'libperfetto_client_experimental': [
@@ -383,6 +385,8 @@
self.static_libs = set()
self.whole_static_libs = set()
self.cflags = set()
+ self.dist = dict()
+ self.strip = dict()
self.stl = None
def to_string(self, output):
@@ -392,6 +396,8 @@
self._output_field(nested_out, 'whole_static_libs')
self._output_field(nested_out, 'cflags')
self._output_field(nested_out, 'stl')
+ self._output_field(nested_out, 'dist')
+ self._output_field(nested_out, 'strip')
if nested_out:
output.append(' %s: {' % self.name)