[PATCH] D69383: [RISCV] Match GCC `-march`/`-mabi` driver defaults

Sam Elliott via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 24 11:20:35 PDT 2019


lenary marked an inline comment as done.
lenary added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:537
+  if (Triple.getArch() == llvm::Triple::riscv32)
+    return "rv32gc";
   else
----------------
khchen wrote:
> Why do you set rv32gc and rv64gc as default march? Is there a any reason?
This reflects the logic in [[ https://github.com/riscv/riscv-gcc/blob/riscv-gcc-9.2.0/gcc/config.gcc#L4229-L4369 | `config.gcc` ]]. Note line 4273, which applies if neither arch nor abi is given (the xlen is set on line 4233-4234 based on the target triple).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69383





More information about the cfe-commits mailing list