[PATCH] D91442: [clang][Driver] Handle risvc in Baremetal.cpp.
Hafiz Abid Qadeer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 13 09:49:06 PST 2020
abidh created this revision.
abidh added reviewers: asb, jroelofs, manojgupta, clang.
Herald added subscribers: cfe-commits, frasercrmck, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, lenary, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, kristof.beyls.
Herald added a project: clang.
abidh requested review of this revision.
I am working on a baremetal riscv toolchain using LLVM runtime and
LLD linker. Baremetal.cpp provides most of the things needed for such
toolchain. So I have modified it to also handle riscv64/32-unknown-elf
targets alongside arm-none-eabi.
Currently, targets like riscv64-unknown-elf are handled by RISCVToolChain
which mostly expects a gcc toolchain to be present. If you dont
want the dependency on gcc-toolchain/libgloss or want to use LLD, then
RISCVToolChain is not a good fit.
So in the toolchain selection code, I have made this dependency of
RISCVToolChain on gcc toolchain explicit. It is created if gcc-toolchain
option is present. Otherwise Baremetal toolchain is created. I will be
happy to hear if there is a better way to choose between these two
toolchains.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91442
Files:
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChains/BareMetal.cpp
clang/test/Driver/baremetal.cpp
clang/test/Driver/riscv-gnutools.c
clang/test/Driver/riscv32-toolchain.c
clang/test/Driver/riscv64-toolchain.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91442.305185.patch
Type: text/x-patch
Size: 15967 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201113/4a9fa4d8/attachment-0001.bin>
More information about the cfe-commits
mailing list