diff options
author | 2025-02-17 16:29:10 +0900 | |
---|---|---|
committer | 2025-02-17 21:11:46 -0800 | |
commit | 1ddc6faa7e08713185cd6925f3c1874787af8ae1 (patch) | |
tree | 50a9f4b6a946d6b6884e099b640723138a44a2ac | |
parent | 496c71d48b22b1647ba48149a9740d5b830803b9 (diff) |
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
-rwxr-xr-x | scripts/strip.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/strip.sh b/scripts/strip.sh index 8d69f0d12..5320ef620 100755 --- a/scripts/strip.sh +++ b/scripts/strip.sh @@ -101,7 +101,12 @@ do_strip_keep_mini_debug_info_darwin() { 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 |