[PATCH] D39963: [RISCV][RFC] Add initial RISC-V target and driver support

Alex Bradbury via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 13 08:59:45 PST 2017


asb created this revision.
Herald added subscribers: jordy.potman.lists, simoncook, johnrusso, rbar, mgorny.

I'm marking this as an RFC as I'd initially like to get feedback on the testing approach and structure of this patch (is this about the right granularity or would you prefer to start with something more minimal?). Follow-up patches will add ABI lowering and expand command line option parsing.

I wouldn't want to have the addition of RISC-V clang support gated on improving clang cross compilation support (e.g. config files or similar as has been discussed on the mailing list). However, if there's a straight-forward way I can reduce duplication and extend something already in-tree then of course I'd like to do that. One option might be to extend the BareMetal toolchain with RISC-V support, though I'd want the flexibility of using libgcc if preferred, and using the GNU linker rather than lld. What do you think Jonathan?

Please do add reviewers who may be qualified and willing to help. I'm picking on Chandler for kindly offering to help get this reviewed (either personally or pointing me to the right person), Petr for your work on the Fuchsia driver and Jonathan for your work on the BareMetal driver.

I'm currently reliant on the user setting up riscv32-ld or riscv64-ld symlinks. Is there some common code somewhere I'm missing for finding an appropriate linker in the GCC installation path?


https://reviews.llvm.org/D39963

Files:
  lib/Basic/CMakeLists.txt
  lib/Basic/Targets.cpp
  lib/Basic/Targets/RISCV.cpp
  lib/Basic/Targets/RISCV.h
  lib/Driver/CMakeLists.txt
  lib/Driver/Driver.cpp
  lib/Driver/ToolChains/Clang.cpp
  lib/Driver/ToolChains/Clang.h
  lib/Driver/ToolChains/Gnu.cpp
  lib/Driver/ToolChains/RISCV.cpp
  lib/Driver/ToolChains/RISCV.h
  test/Driver/frame-pointer.c
  test/Driver/riscv-abi.c
  test/Driver/riscv-features.c
  test/Driver/riscv32-toolchain.c
  test/Driver/riscv64-toolchain.c
  test/Preprocessor/init.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39963.122661.patch
Type: text/x-patch
Size: 43529 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171113/7123c6ff/attachment-0001.bin>


More information about the cfe-commits mailing list