Index: build/toolchain/android/BUILD.gn |
diff --git a/build/toolchain/android/BUILD.gn b/build/toolchain/android/BUILD.gn |
index aaaf97f1cfeb85b4422f824d63755a92573b80e0..9ae22183407865cf7c77e65380351f10797ddf8d 100644 |
--- a/build/toolchain/android/BUILD.gn |
+++ b/build/toolchain/android/BUILD.gn |
@@ -57,10 +57,21 @@ template("android_gcc_toolchain") { |
temp_stripped_soname = "${stripped_soname}.tmp" |
android_strip = "${tool_prefix}strip" |
+ |
mkdir_command = "mkdir -p lib.stripped" |
strip_command = "$android_strip --strip-unneeded -o $temp_stripped_soname $soname" |
replace_command = "if ! cmp -s $temp_stripped_soname $stripped_soname; then mv $temp_stripped_soname $stripped_soname; fi" |
postsolink = "$mkdir_command && $strip_command && $replace_command" |
+ solink_outputs = [ stripped_soname ] |
+ |
+ # We make the assumption that the gcc_toolchain will produce an exe with |
+ # the following definition. |
+ exe = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" |
+ stripped_exe = "exe.stripped/$exe" |
+ mkdir_command = "mkdir -p exe.stripped" |
+ strip_command = "$android_strip --strip-unneeded -o $stripped_exe $exe" |
+ postlink = "$mkdir_command && $strip_command" |
+ link_outputs = [ stripped_exe ] |
} |
} |