[llvm-dev] RFC: Deprecate config.guess
Renato Golin via llvm-dev
llvm-dev at lists.llvm.org
Thu Sep 16 03:42:43 PDT 2021
On Wed, 15 Sept 2021 at 20:32, Fāng-ruì Sòng <maskray at google.com> wrote:
> The nature of such a change is that only when I flip the default,
> users will actually notice.
>
Getting a different triple may be worse than the wrong triple.
The wrong triple crashes something and is easy to identify. A different,
but valid, triple may bring slight architectural changes down the line that
are difficult to spot.
Changing the triple on the front end isn't always trivial either.
There's a whole dance of changing triples in the clang driver that defies
logic sometimes. The command line options to the actual front-end depend on
the triple and the path taken, which in turn, can change code generation in
unpredictable ways down the line.
Users of alternative compilers have already contributed relevant logic
> to llvm/cmake/modules/GetHostTriple.cmake ,
> and we should just focus on gcc/clang which are more relevant for the
> existing config.guess use cases.
> I believe {gcc,clang} -dumpmachine is correct in more cases than
> config.guess .
>
Not only that, but using the compiler driver to "predict" what the compiler
front-end needs is the obvious thing to do.
I'm not against the change, I think we should have done this a long time
ago, but I think we can give people some grace time to test out on their
sides, especially downstream people and less popular platforms that still
use clang/gcc to build LLVM.
Giving them a CMake flag to test out for a few weeks wouldn't hurt before
we turn it on by default.
cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210916/89b79fb8/attachment.html>
More information about the llvm-dev
mailing list