Skip attempting unsupported llvm-strip operation for COFF binaries
Prevent printing the following confusing and superfluous error message:
prebuilts/clang/host/linux-x86/clang-r547379/bin/llvm-strip: error: option is not supported for COFF
Test: presubmit
Change-Id: Id5a940f8c78497cf5dae3b540e0ec8eab46da013
diff --git a/scripts/strip.sh b/scripts/strip.sh
index 8d69f0d..5320ef6 100755
--- a/scripts/strip.sh
+++ b/scripts/strip.sh
@@ -101,7 +101,12 @@
do_strip_keep_mini_debug_info_linux() {
rm -f "${outfile}.mini_debuginfo.xz"
local fail=
- "${CLANG_BIN}/llvm-strip" --strip-all --keep-section=.ARM.attributes --remove-section=.comment "${infile}" -o "${outfile}.tmp" || fail=true
+ if [ -z "${windows}" ]; then
+ "${CLANG_BIN}/llvm-strip" --strip-all --keep-section=.ARM.attributes --remove-section=.comment "${infile}" -o "${outfile}.tmp" || fail=true
+ else
+ # --keep-section not supported for Windows COFF.
+ fail=true
+ fi
if [ -z $fail ]; then
# create_minidebuginfo has issues with compressed debug sections. Just