[all-commits] [llvm/llvm-project] da4fcb: [RISCV][Driver] Allow the use of CPUs with a diffe...

Kito Cheng via All-commits all-commits at lists.llvm.org
Wed Apr 26 23:46:16 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: da4fcb0c0b281746067f92d8804c18dbce4269bd
  Author: Kito Cheng <kito.cheng at sifive.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M clang/lib/Driver/Driver.cpp
    M clang/test/Driver/riscv-arch.c
    M clang/test/Driver/riscv-cpus.c

  Log Message:
  [RISCV][Driver] Allow the use of CPUs with a different XLEN than the triple.

Our downstream toolchain release got some issue is we set the default
triple by creating symbolic link of clang like `riscv64-unknown-elf-clang`,
and has lots of multi-lib config including rv32's config.

However when we trying to set arch by a 32 bit CPU like generic-rv32
but got error message below:
error: unsupported argument 'generic-rv32' to option '-mcpu='

`generic-rv32` is listed in the output of `-mcpu=help`, that
might be confusing for user since help message say supported.

So let clang driver also consider -mcpu option during computing
the target triple to archvie that.

Reviewed By: asb, craig.topper

Differential Revision: https://reviews.llvm.org/D148124

More information about the All-commits mailing list