summaryrefslogtreecommitdiff
path: root/detect-compiler
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-08-06 20:35:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-08-06 20:35:37 (GMT)
commitf32c5d37161f8444afe016e20be2c6ce6479d793 (patch)
treee039cddbee77abff1cb13959c48226e7d0b79e2b /detect-compiler
parent33f13ad7c5cfffdcd446a02dd8ef4b77bc70affe (diff)
downloadgit-f32c5d37161f8444afe016e20be2c6ce6479d793.zip
git-f32c5d37161f8444afe016e20be2c6ce6479d793.tar.gz
git-f32c5d37161f8444afe016e20be2c6ce6479d793.tar.bz2
build: catch clang that identifies itself as "$VENDOR clang"
The case statement in detect-compiler notices 'clang', 'FreeBSD clang' and 'Apple clang', but there are other platforms that follow the '$VENDOR clang' pattern (e.g. Debian). Generalize the pattern to catch them. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'detect-compiler')
-rwxr-xr-xdetect-compiler7
1 files changed, 2 insertions, 5 deletions
diff --git a/detect-compiler b/detect-compiler
index 955be1c..11d60da 100755
--- a/detect-compiler
+++ b/detect-compiler
@@ -38,13 +38,10 @@ case "$(get_family)" in
gcc)
print_flags gcc
;;
-clang)
+clang | *" clang")
print_flags clang
;;
-"FreeBSD clang")
- print_flags clang
- ;;
-"Apple LLVM"|"Apple clang")
+"Apple LLVM")
print_flags clang
;;
*)