jrtc27 added inline comments.

================
Comment at: clang/lib/Driver/Driver.cpp:5216-5220
+        if (toolchains::RISCVToolChain::hasGCCToolchain(*this, Args))
+          TC =
+              std::make_unique<toolchains::RISCVToolChain>(*this, Target, 
Args);
+        else
+          TC = std::make_unique<toolchains::BareMetal>(*this, Target, Args);
----------------
This has broken our use downstream. We construct a normal bare-metal 
non-multilib baremetal sysroot, no GCC involved, passed explicitly with 
--sysroot. However, BareMetal's findRISCVMultilibs unconditionally appends 
multilib paths for anything other than IMAC (always ILP32/LP64) (well, it still 
appends the path, just the multilib path is curiously empty), without filtering 
out ones that don't exist like Gnu.cpp. I assume the empty string for IMAC is a 
hack to allow most normal uses of bare-metal toolchains to work, but it breaks 
if you want hard float support (or fewer extensions).

I suspect this is best fixed by filtering out non-existent directories from 
findRISCVMultilibs (and at the same time, fixing IMAC to have a non-empty path, 
since RISCVToolChain has one for it, and we no longer need the hacky, 
insufficient workaround)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91442

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to