[flang-commits] [PATCH] D126291: [flang][Driver] Update link job on windows

Martin Storsjö via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Jun 13 02:16:03 PDT 2022


mstorsjo added a comment.

In D126291#3577133 <https://reviews.llvm.org/D126291#3577133>, @rovka wrote:

> 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.

If you actually execute code generation, then yes, it fails if that specific arch isn't enabled. But for general compiler driver level tests, which just print out the command the would have executed (when running with `-###`), it should work without the actual code generation target being available. This is at least how it's done for clang's corresponding tests, most files in `clang/test/Driver` have hardcoded arch triples, without any REQUIRES lines or other exclusions.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126291/new/

https://reviews.llvm.org/D126291



More information about the flang-commits mailing list