]> git.ipfire.org Git - thirdparty/git.git/commitdiff
build: update detect-compiler for newer Xcode version
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>
Fri, 6 Aug 2021 08:06:34 +0000 (01:06 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Aug 2021 20:29:00 +0000 (13:29 -0700)
1da1580e4c (Makefile: detect compiler and enable more warnings in
DEVELOPER=1, 2018-04-14) uses the output of the compiler banner to
detect the compiler family.

Apple had since changed the wording used to refer to its compiler
as clang instead of LLVM as shown by:

  $ cc --version
  Apple clang version 12.0.5 (clang-1205.0.22.9)
  Target: x86_64-apple-darwin20.6.0
  Thread model: posix
  InstalledDir: /Library/Developer/CommandLineTools/usr/bin

so update the script to match, and allow DEVELOPER=1 to work as
expected again in macOS.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
detect-compiler

index 70b754481c877cab3d7f87cf08b7403846925860..c85be83c6427b34441b6a07b6b4f238efa04635d 100755 (executable)
@@ -44,7 +44,7 @@ clang)
 "FreeBSD clang")
        print_flags clang
        ;;
-"Apple LLVM")
+"Apple LLVM"|"Apple clang")
        print_flags clang
        ;;
 *)