[flang-commits] [PATCH] D126291: [flang][Driver] Update link job on windows
Diana Picus via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon Jun 13 02:07:50 PDT 2022
rovka added a comment.
I had the same idea about switching the tests to using target triples instead of having separate files for it, but initially I had some issues getting that to work properly. When specifying a triple, we need to provide an architecture. Leaving the triple as `unkown-linux-gnu` or just `linux-gnu` gives us an error along the lines of `flang-new: error: unknown target triple 'unknown-unknown-linux-gnu', please use -triple or -arch`. OTOH, hardcoding an architecture like x86 or aarch64 fails if we're not building that specific backend. We could do that and make the test REQUIRE the architecture that we're hardcoding, but this isn't really an architecture-specific test. So what I've finally done instead is to check for flang supported architectures and add a lit substitution for the first one that we find (be it aarch64, powerpc or x86) and use that in the test. We'll still get an error if someone tries to build the test without enabling any of these targets, but I think that's a good thing, since then people can decide either to add their architecture to lit or just, you know, not build flang on platforms where it isn't supported :) Patch incoming.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126291/new/
https://reviews.llvm.org/D126291
More information about the flang-commits
mailing list