Harald van Dijk via llvm-dev
2021-Apr-05 08:44 UTC
[llvm-dev] Updating config.guess, license change
On 05/04/2021 00:24, Petr Hosek wrote:> You can construct the triple from the variables CMake provides, we > already do this for some of the targets: > https://github.com/llvm/llvm-project/blob/00d5f1ecccc6d8ece9ac6dd19e9ad807c8a60097/llvm/cmake/modules/GetHostTriple.cmake > <https://github.com/llvm/llvm-project/blob/00d5f1ecccc6d8ece9ac6dd19e9ad807c8a60097/llvm/cmake/modules/GetHostTriple.cmake>"Some of the targets" used to be only Windows, where we do not necessarily have a way to run config.guess at all. That seems like a perfectly good reason to me to add an exception for. I do not know why <https://reviews.llvm.org/D74256> then also added logic for AIX there. Either config.guess is buggy, or it is not. If config.guess is buggy, it is also buggy for every single autoconf-based project there is and will need to be fixed there as well. There has been no relevant change to upstream config.guess for AIX that I can see, but I may have missed something. If config.guess is not buggy, the change is wrong. Am I missing something here, perhaps some some scenario that LLVM supports but config.guess does not, that would make it correct to change that only in LLVM, and not in upstream config.guess?> I'd prefer expanding GetHostTriple.cmake until it covers all the targets > we support. I don't think it'd necessarily require reimplementing all of > config.guess, since config.guess covers a lot of targets most of which > aren't supported by LLVM.Not all, sure, but I do think you're underestimating how much work it will be, at least for an outside contributor who cannot ask people who have access to relevant systems to run some quick tests. Getting an overview of all targets supported by LLVM, the values the relevant CMake variables will be set to, and the triples that config.guess figures out for those systems, that would still be a massive amount of work. Once we have that, writing it up in CMake should be fairly easy, sure, but that's not where the main work will be. All that just to get a result we can get without any extra effort already. Cheers, Harald van Dijk
Hubert Tong via llvm-dev
2021-Apr-05 17:22 UTC
[llvm-dev] Updating config.guess, license change
On Mon, Apr 5, 2021 at 4:44 AM Harald van Dijk via llvm-dev < llvm-dev at lists.llvm.org> wrote:> On 05/04/2021 00:24, Petr Hosek wrote: > > You can construct the triple from the variables CMake provides, we > > already do this for some of the targets: > > > https://github.com/llvm/llvm-project/blob/00d5f1ecccc6d8ece9ac6dd19e9ad807c8a60097/llvm/cmake/modules/GetHostTriple.cmake > > < > https://github.com/llvm/llvm-project/blob/00d5f1ecccc6d8ece9ac6dd19e9ad807c8a60097/llvm/cmake/modules/GetHostTriple.cmake > > > > "Some of the targets" used to be only Windows, where we do not > necessarily have a way to run config.guess at all. That seems like a > perfectly good reason to me to add an exception for. > > I do not know why <https://reviews.llvm.org/D74256> then also added > logic for AIX there. Either config.guess is buggy, or it is not. > > If config.guess is buggy, it is also buggy for every single > autoconf-based project there is and will need to be fixed there as well. > There has been no relevant change to upstream config.guess for AIX that > I can see, but I may have missed something. > > If config.guess is not buggy, the change is wrong. > > Am I missing something here, perhaps some some scenario that LLVM > supports but config.guess does not, that would make it correct to change > that only in LLVM, and not in upstream config.guess? >LLVM uses triples to identify the host/target architecture (including the difference between 32-bit and 64-bit variants of the "same architecture"). It cannot be said that config.guess must do the same (that would depend on its users). That the selection, on AIX, between the 32-bit and 64-bit variants happens later for an autoconf-based build is entirely possible. As it is, we're able to do the selection early in the CMake-based build only because we're using a compiler that respects the OBJECT_MODE environment variable (which we also set up for Clang on AIX to do).> > > I'd prefer expanding GetHostTriple.cmake until it covers all the targets > > we support. I don't think it'd necessarily require reimplementing all of > > config.guess, since config.guess covers a lot of targets most of which > > aren't supported by LLVM. > > Not all, sure, but I do think you're underestimating how much work it > will be, at least for an outside contributor who cannot ask people who > have access to relevant systems to run some quick tests. Getting an > overview of all targets supported by LLVM, the values the relevant CMake > variables will be set to, and the triples that config.guess figures out > for those systems, that would still be a massive amount of work. Once we > have that, writing it up in CMake should be fairly easy, sure, but > that's not where the main work will be. All that just to get a result we > can get without any extra effort already. > > Cheers, > Harald van Dijk > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210405/71ab0f1a/attachment.html>