[PATCH] D145883: [Flang][RISCV] Emit target features for RISC-V

Andrzej Warzynski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 13 01:27:00 PDT 2023


awarzynski added inline comments.


================
Comment at: flang/test/Driver/target-features.f90:1
+! RUN: %flang --target=riscv64-linux-gnu --target=riscv64 -c %s -### 2>&1 \
+! RUN: | FileCheck %s -check-prefix=CHECK-RV64
----------------
jrtc27 wrote:
> awarzynski wrote:
> > What happens if the RISC-V backend is not available?
> Clang doesn't need a backend to be available to generate IR for that architecture. I would hope Flang is the same.
> Clang doesn't need a backend to be available to generate IR 

This test is not generating LLVM IR. It does, however, specify the target which is then translated into many **LLVM**-specific flags. 

Also:
```
clang --target=riscv64-linux-gnu --target=riscv64 -c file2.c
error: unable to create target: 'No available targets are compatible with triple "riscv64"'
1 error generated.
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145883



More information about the cfe-commits mailing list