From: "Ævar Arnfjörð Bjarmason" <avarab@gmail•com>
To: Jeff King <peff@peff•net>
Cc: "Junio C Hamano" <gitster@pobox•com>,
git@vger•kernel.org,
"Carlo Marcelo Arenas Belón" <carenas@gmail•com>
Subject: Re: [PATCH v2 0/3] detect-compiler: clang updates
Date: Sat, 07 Aug 2021 17:36:57 +0200 [thread overview]
Message-ID: <87zgttxo3i.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <YQ6bTm6DxeJLhmeA@coredump.intra.peff.net>
On Sat, Aug 07 2021, Jeff King wrote:
> On Sat, Aug 07, 2021 at 04:26:33PM +0200, Ævar Arnfjörð Bjarmason wrote:
>
>> > That would probably be better. I would be curious to hear from somebody
>> > with a mac if this technique gives more sensible version numbers for the
>> > Apple-clang compiler.
>>
>> It does, on the gcc304 box on the gccfarm (recent apple M1 Mac Mini):
>>
>> avar@minimac ~ % uname -a
>> Darwin minimac.moose.housegordon.com 20.4.0 Darwin Kernel
>> Version 20.4.0: Thu Apr 22 21:46:41 PDT 2021;
>> root:xnu-7195.101.2~1/RELEASE_ARM64_T8101 arm64
>> avar@minimac ~ % clang --version
>> Apple clang version 12.0.5 (clang-1205.0.22.9)
>> Target: arm64-apple-darwin20.4.0
>> Thread model: posix
>> InstalledDir: /Library/Developer/CommandLineTools/usr/bin
>>
>> avar@minimac ~ % cat >f
>> GNUC=__GNUC__
>> GNUC_MINOR=__GNUC_MINOR__
>> GNUC_PATCHLEVEL=__GNUC_PATCHLEVEL__
>> clang=__clang__
>> clang_major=__clang_major__
>> clang_minor=__clang_minor__
>> clang_patchlevel=__clang_patchlevel__
>>
>> ^C
>>
>> avar@minimac ~ % clang -E - <f
>> # 1 "<stdin>"
>> # 1 "<built-in>" 1
>> # 1 "<built-in>" 3
>> # 384 "<built-in>" 3
>> # 1 "<command line>" 1
>> # 1 "<built-in>" 2
>> # 1 "<stdin>" 2
>> GNUC=4
>> GNUC_MINOR=2
>> GNUC_PATCHLEVEL=1
>> clang=1
>> clang_major=12
>> clang_minor=0
>> clang_patchlevel=5
>
> Hmm, now I'm really confused, though. Is that really clang 12 (for which
> there is no 12.0.5; 12.0.1 is the latest version, shipped in July)? Or
> is it XCode 12, shipping with LLVM 11, according to the table in:
>
> https://en.wikipedia.org/wiki/Xcode#Xcode_11.x_-_13.x_(since_SwiftUI_framework)
>
> (sorry, there are actually _two_ tables with that same anchor on the
> page; the one you want is the second one, under "Toolchain versions").
>
> The distinction does not matter for our script (where we only care about
> "clang4" and up). I guess the most relevant test would be to get XCode
> 8.x and see what it says. I expect it to claim "clang 8.1.0" or similar,
> but actually be clang-3. And therefore not support
> -Wtautological-constant-out-of-range-compare.
>
> If we can't get easily get hold of such a platform, then maybe that is a
> good indication that this conversation is too academic for now, and we
> should wait until somebody wants to add a more recent version-specifier
> to config.mak.dev. ;)
I think it's clang 12.0.5, and Apple just takes upstream versions and
increments them, e.g. I found this:
https://gist.github.com/yamaya/2924292
So you can presumably rely on it for having clang 12 features, and we'd
only ever care about the clang_major...
next prev parent reply other threads:[~2021-08-07 15:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-06 8:06 [PATCH] makefile: update detect-compiler for newer Xcode version Carlo Marcelo Arenas Belón
2021-08-06 12:00 ` Bagas Sanjaya
2021-08-06 13:32 ` Carlo Arenas
2021-08-06 16:37 ` Eric Sunshine
2021-08-06 13:42 ` Atharva Raykar
2021-08-06 18:11 ` Junio C Hamano
2021-08-06 19:20 ` Jeff King
2021-08-06 20:52 ` [PATCH v2 0/3] detect-compiler: clang updates Junio C Hamano
2021-08-06 20:52 ` [PATCH v2 1/3] build: update detect-compiler for newer Xcode version Junio C Hamano
2021-08-06 20:52 ` [PATCH v2 2/3] build: clang version may not be followed by extra words Junio C Hamano
2021-08-06 20:52 ` [PATCH v2 3/3] build: catch clang that identifies itself as "$VENDOR clang" Junio C Hamano
2021-08-07 2:09 ` Jeff King
2021-08-07 2:02 ` [PATCH v2 0/3] detect-compiler: clang updates Ævar Arnfjörð Bjarmason
2021-08-07 2:15 ` Jeff King
2021-08-07 2:56 ` Ævar Arnfjörð Bjarmason
2021-08-07 14:13 ` Jeff King
2021-08-07 14:26 ` Ævar Arnfjörð Bjarmason
2021-08-07 14:40 ` Jeff King
2021-08-07 15:36 ` Ævar Arnfjörð Bjarmason [this message]
2021-08-09 18:10 ` Jeff King
2021-08-08 0:30 ` Carlo Arenas
2021-08-09 18:08 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zgttxo3i.fsf@evledraar.gmail.com \
--to=avarab@gmail$(echo .)com \
--cc=carenas@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=peff@peff$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox