Re: [PATCH v2 0/3] detect-compiler: clang updates
- From
Jeff King <peff@peff.net>
- Date
- Aug 7, 2021, 02:15 UTC
- Message-ID
- <YQ3suvJfspzRNPL9@coredump.intra.peff.net>
- In-Reply-To
- <87bl6aypke.fsf@evledraar.gmail.com>
On Sat, Aug 07, 2021 at 04:02:45AM +0200, Ævar Arnfjörð Bjarmason wrote:
> Perhaps I've missed some obvious reason not to do this, but why are we > parsing the --version output of two modern compilers, as opposed to just > asking them what type/version they are via their usual macro facilities? > I.e. something like the below:
That would probably work OK in practice, but it actually seems more complex to me (how do other random compilers react to "-E -"? Is it possible for us to get other output from the preprocessor that would confuse an eval?).
It could perhaps make the Apple version-string confusion go away, though, which might make it worth doing.
-Peff