[PATCH] D91442: [clang][Driver] Handle risvc in Baremetal.cpp.

Hafiz Abid Qadeer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 18 12:08:07 PST 2020


abidh updated this revision to Diff 306180.
abidh added a comment.
Herald added a subscriber: MaskRay.

This update contains following changes.

1. Address issue raised by lenary. I have introduced a static function that checks for the presence of gcc toolchain first by --gcc-toolchain argument or in the same prefix where clang is installed. If found, RISCVToolChain is instantiated. I have added tests in riscv64-toolchain-extra.c and riscv32-toolchain-extra.c to check this case.

2. Fixed some formatting things pointed out by jrtc27.

3. In the initial revision, jroelofs commented that other place where Baremetal is intantiated should have the similar check. I put that in 2nd version of the patch. But I think it does quite make sense in the current patch so I have removed it.

4. Rebased baremetal.cpp tests after recent changes and fixed some typos.


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

https://reviews.llvm.org/D91442

Files:
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/ToolChains/BareMetal.cpp
  clang/lib/Driver/ToolChains/RISCVToolchain.cpp
  clang/lib/Driver/ToolChains/RISCVToolchain.h
  clang/test/Driver/baremetal.cpp
  clang/test/Driver/riscv-gnutools.c
  clang/test/Driver/riscv32-toolchain-extra.c
  clang/test/Driver/riscv32-toolchain.c
  clang/test/Driver/riscv64-toolchain-extra.c
  clang/test/Driver/riscv64-toolchain.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91442.306180.patch
Type: text/x-patch
Size: 20863 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201118/d22d630a/attachment-0001.bin>


More information about the cfe-commits mailing list