Issue |
90470
|
Summary |
clang riscv64 target accepts rv32 -march option (and vice versa)
|
Labels |
clang,
backend:RISC-V
|
Assignees |
|
Reporter |
DavidSpickett
|
The following does not error or warn:
```
$ ./bin/clang /tmp/test.c -target riscv64 -march=rv32i -o - -S
```
And it produces code according to the value of `-march`:
```
.text
.attribute 4, 16
.attribute 5, "rv32i2p1"
```
The opposite also works:
```
$ ./bin/clang /tmp/test.c -target riscv32 -march=rv64i -o - -S
```
I assume I have to pick one of `-target riscv32` and `-target riscv64` because if I use `-target riscv` I get:
```
$ ./bin/clang /tmp/test.c -target riscv -march=rv64i -o - -S
clang: error: unsupported option '-march=' for target 'riscv'
```
Which itself is a bit unclear because I'm not sure `riscv` is even a valid target to begin with, but this is not RISC-V specific:
```
$ ./bin/clang /tmp/test.c -target aardvark -march=rv64i -o - -S
clang: error: unsupported option '-march=' for target 'aardvark'
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs