Fix strip-llvm.sh after updating to the latest version of clang
In this version, the binary actually is named clang-7 instead of clang-7.0. This requires extending the test a little for keeping such binaries but removing other clang-foo tools.
This commit is contained in:
1 parent
c9db1e06b5
commit
579aa616b4
1 file changed
+9
@@ -16,6 +16,15 @@ for i in bugpoint c-index-test clang-* dsymutil git-clang-format llc lli llvm-*
|
|||||||
;;
|
;;
|
||||||
clang++|clang-*.*|clang-cpp)
|
clang++|clang-*.*|clang-cpp)
|
||||||
;;
|
;;
|
||||||
|
clang-*)
|
||||||
|
suffix="${i#*-}"
|
||||||
|
# Test removing all numbers from the suffix; if it is empty, the suffix
|
||||||
|
# was a plain number (as if the original name was clang-7); if it wasn't
|
||||||
|
# empty, remove the tool.
|
||||||
|
if [ "$(echo $suffix | tr -d '[0-9]')" != "" ]; then
|
||||||
|
rm $i
|
||||||
|
fi
|
||||||
|
;;
|
||||||
llvm-ar|llvm-cvtres|llvm-dlltool|llvm-nm|llvm-objdump|llvm-ranlib|llvm-rc|llvm-readobj|llvm-strings)
|
llvm-ar|llvm-cvtres|llvm-dlltool|llvm-nm|llvm-objdump|llvm-ranlib|llvm-rc|llvm-readobj|llvm-strings)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
Reference in new issue
Block a user