Joe updated this revision to Diff 543440.
Joe added a comment.
Add default ABI to multilib flags if none supplied
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155294/new/
https://reviews.llvm.org/D155294
Files:
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/ToolChain.cpp
Joe added a comment.
> Theoretically, I think this matching of multilibs could be done without the
> need for multilib.yaml, but it is indeed much easier considering the logic is
> already there.
Actually, I retract this statement. There would be no way of knowing what the
default library is
Joe created this revision.
Joe added reviewers: michaelplatings, kito-cheng.
Joe added a project: clang.
Herald added subscribers: jobnoorman, luke, shiva0217, VincentWu, vkmr,
frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna,
psnobl, abidh, jocewei, PkmX, the_o,
Joe added a comment.
> Thanks for explaining. I found that when I was writing a regex to match flags
> it was helpful to have a part of the string I could be sure would be there to
> avoid matching the wrong type of flag, and `march=` helped with that. I also
> worry that names from
Joe added a comment.
>> The main trouble I had was at that point we don't have a reference to the
>> ToolChain, so calling `getMultiSelectionFlags` was not possible. [...] I'm
>> not sure what the solution here is.
>
> I see two options:
>
> 1. Split getMultiSelectionFlags into
Joe added a comment.
So again, I took these patches for a spin with RISC-V. As I mentioned before, I
was using a GCC installation, so the multilib selection happens inside Gnu.cpp
(findRISCVBareMetalMultilibs). The main trouble I had was at that point we
don't have a reference to the
Joe added a comment.
FWIW I tried this patch out with RISC-V multilibs, and it works a treat. It
solves the multilib reuse problem and relaxes the order of non-standard
extensions. I did have to copy some of the logic from BareMetal.cpp to Gnu.cpp
as was using a GCC installation.
The `args`