<div dir="ltr"><div dir="ltr">On Wed, 15 Sept 2021 at 20:32, Fāng-ruì Sòng <<a href="mailto:maskray@google.com">maskray@google.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The nature of such a change is that only when I flip the default,<br>
users will actually notice.<br></blockquote><div><br></div><div>Getting a different triple may be worse than the wrong triple.</div><div><br></div><div>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.</div><div><br></div><div>Changing the triple on the front end isn't always trivial either.</div><div><br></div><div>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.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Users of alternative compilers have already contributed relevant logic<br>
to llvm/cmake/modules/GetHostTriple.cmake ,<br>
and we should just focus on gcc/clang which are more relevant for the<br>
existing config.guess use cases.<br>
I believe {gcc,clang} -dumpmachine is correct in more cases than config.guess .<br></blockquote><div><br></div><div>Not only that, but using the compiler driver to "predict" what the compiler front-end needs is the obvious thing to do.</div><div><br></div><div>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.</div><div><br></div><div>Giving them a CMake flag to test out for a few weeks wouldn't hurt before we turn it on by default.</div><div><br></div><div>cheers,</div><div>--renato</div></div></div>