[PATCH] D110900: Triple: Add RedHat vendor

Aaron Puchert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 17:32:10 PDT 2023


aaronpuchert added a comment.

In D110900#4242211 <https://reviews.llvm.org/D110900#4242211>, @hvdijk wrote:

> My thinking there was that, taking `x86_64-redhat-linux-gnu` as an example, we know that the GCC installation we are looking for is going to use a target name of exactly `x86_64-redhat-linux`, so we can search for only that and skip the search for other target names, and skip the file system accesses associated with the search for other target names.

I'd like to get there, but with `x86_64-suse-linux` as target triple, the same as GCC.

> And if we do it that way, there is no longer a drawback to using `x86_64-redhat-linux-gnu` as the LLVM triple, so we can simply use that and avoid the special vendor-based exceptions in `isGNUEnvironment()` that we have in this diff.

With the vendor-based exceptions we can have both compilers use the same triple and Clang can simply look for a directory matching its own triple. So we don't need to maintain a map "Clang triple → GCC triple", and it might be less confusing for users. GCC is the primary compiler on RedHat/SUSE and thus it seems good UX to use the same terminology. "When in Rome, do as the Romans do."


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110900



More information about the llvm-commits mailing list