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

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 27 17:58:40 PDT 2023


MaskRay added inline comments.
Herald added subscribers: wangpc, luke, sunshaoce, arichardson.
Herald added a project: All.


================
Comment at: clang/lib/Driver/ToolChains/RISCVToolchain.cpp:40
+                                     const llvm::opt::ArgList &Args) {
+  if (Args.getLastArg(options::OPT_gcc_toolchain))
+    return true;
----------------
This logic (if `--gcc-toolchain=` is available or `lib/crt0.o` is present, select `RISCVToolChain`; otherwise `BareMetal`) is strange.

Can someone shed light on what this `RISCVToolChain` is intended and which `crt0.o` is used?


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