[PATCH] D97916: [Driver][RISCV] Support parsing multi-lib config from GCC.

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 4 00:24:26 PST 2021


MaskRay added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:727
+{
+  /* Default code model is small(medlow).  */
+  StringRef CodeModel;
----------------
`//`


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:1595
+    return GCCPath.str().str();
+  else
+    return "";
----------------
https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:1625
+
+bool ScanGCCMultilibConfig(
+    const Driver &D,
----------------
camelCase. Just ignore older functions which use CamelCase.


================
Comment at: clang/test/Driver/riscv64-toolchain.c:158
+// RUN: %clang %s \
+// RUN:   -target riscv64-unknown-elf \
+// RUN:   --gcc-toolchain=%S/Inputs/multilib_riscv64_elf_sdk \
----------------
Hmm. I happened to have posted https://lists.llvm.org/pipermail/cfe-dev/2021-March/067820.html about how folks use --gcc-toolchain.

Is this an useful option on non-riscv host?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97916



More information about the cfe-commits mailing list