Remove strip.sh intermediates
The intermediate files generated by strip.sh --keep-symbols can be
very large, and are not useful after the build. Remove them once
the final output file has been generated.
Saves ~6GB on an aosp_sailfish-userdebug build.
Test: m checkbuild
Change-Id: I0413f16ac5f423bc1b010cc9b8538f19bdea561e
diff --git a/scripts/strip.sh b/scripts/strip.sh
index 29594dc..4634c18 100755
--- a/scripts/strip.sh
+++ b/scripts/strip.sh
@@ -98,6 +98,7 @@
else
"${CROSS_COMPILE}objcopy" --add-section .gnu_debugdata="${outfile}.mini_debuginfo.xz" "${outfile}.tmp"
fi
+ rm -f "${outfile}.dynsyms" "${outfile}.funcsyms" "${outfile}.keep_symbols" "${outfile}.debug" "${outfile}.mini_debuginfo" "${outfile}.mini_debuginfo.xz"
else
cp -f "${infile}" "${outfile}.tmp"
fi