[PATCH] D91442: [clang][Driver] Handle risvc in Baremetal.cpp.
Jon Roelofs via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 13 10:00:38 PST 2020
jroelofs accepted this revision.
jroelofs added a comment.
This revision is now accepted and ready to land.
Seems reasonable.
I could see someone wanting to use `--gcc-toolchain` to point at the baremetal toolchain for their target, but that's unlikely to work out of the box anyway. I'd love to know where the Generic_GCC toolchain is used in practice, since that's always seemed quite fragile to me.
================
Comment at: clang/lib/Driver/Driver.cpp:5150
case llvm::Triple::riscv64:
- TC = std::make_unique<toolchains::RISCVToolChain>(*this, Target, Args);
+ if (!Args.getLastArg(clang::driver::options::OPT_gcc_toolchain) &&
+ toolchains::BareMetal::handlesTarget(Target))
----------------
for consistency and principle-of-least-surprise, maybe we should have the same check in the other place where `toolchains::BareMetal` is created?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91442/new/
https://reviews.llvm.org/D91442
More information about the cfe-commits
mailing list