Page MenuHomePhabricator

Driver: Add a gcc equivalent triple to the list of triples to search
Needs ReviewPublic

Authored by tstellar on Oct 5 2021, 10:37 PM.

Details

Summary

There are some gcc triples, like x86_64-redhat-linux, that provide the
same behavior as a clang triple with a similar name (e.g.
x86_64-redhat-linux-gnu). When searching for a gcc install, also search
for a gcc equivalent triple if one exists.

Diff Detail

Event Timeline

tstellar created this revision.Oct 5 2021, 10:37 PM
tstellar requested review of this revision.Oct 5 2021, 10:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 5 2021, 10:37 PM
MaskRay added a comment.EditedOct 6 2021, 9:30 AM

I think we should reduce normalization for include/library path detection in the clang driver (D110663), instead of adding more customization for each platform.
Some clang driver code uses os and environment to check feature compatibility with a target triple. Due to the limitation of the constructor llvm::Triple::Triple (os/environ is wrong if a un-normalized triple string is passed), such code can keep using the normalized triple.

kwk added a subscriber: kwk.Oct 14 2021, 12:53 PM