[PATCH] D129824: [RISCV] Set triple based on -march flag which can be deduced in more generic way

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 15 20:24:16 PDT 2022


MaskRay added a comment.

In D129824#3794229 <https://reviews.llvm.org/D129824#3794229>, @jrtc27 wrote:

> In D129824#3794221 <https://reviews.llvm.org/D129824#3794221>, @MaskRay wrote:
>
>> Both D54214 <https://reviews.llvm.org/D54214> and this look like a surprising behavior to me. Do we still have time to go back the state before D54214 <https://reviews.llvm.org/D54214> and make mismatching --target & -march= an error?
>
> Then there's no -m32 equivalent; that's what -march currently gives you... also GCC lets you do it. And -target is Clang-specific so you can't write something that works for both compilers.

We can accept `-m32/-m64` as a special case. Other `-m` options

(I edited my previous comment and added a confusing `--target=riscv64 -march=rv64i -m32` case when you made the comment.)


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

https://reviews.llvm.org/D129824



More information about the cfe-commits mailing list