[PATCH] D110900: Triple: Add RedHat vendor

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 3 21:12:54 PDT 2023


tstellar added a comment.

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

> In D110900#4242187 <https://reviews.llvm.org/D110900#4242187>, @MaskRay wrote:
>
>> Can you elaborate? I agree that decreasing the number of filesystem stats is preferable...
>
> 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. 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.

This is exactly what we are doing in Fedora right now: https://src.fedoraproject.org/rpms/clang/blob/rawhide/f/0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch.  The downside of doing this is that it adds even more vendor specific code the driver which we are trying to avoid.

Now that we have improved config file support, another option would be to distribute a default config file that has --gcc-install-dir=/usr/lib/gcc/x86_64-redhat-linux/13/ .


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