[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO
Jessica Clarke via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun May 16 09:56:12 PDT 2021
jrtc27 added inline comments.
================
Comment at: clang/test/Driver/lto.c:81-90
+// Need to pass -target-abi in RISC-V target.
+// RUN: %clang -target riscv64-unknown-elf %s -fuse-ld=gold -flto \
+// RUN: -mabi=lp64f -### 2>&1 | FileCheck %s --check-prefix=RISCV
+// RUN: %clang -target riscv64-unknown-elf %s -fuse-ld=lld -flto \
+// RUN: -mabi=lp64f -### 2>&1 | FileCheck %s --check-prefix=RISCV
+// RUN: %clang -target riscv64-unknown-linux-gnu %s -fuse-ld=gold -flto \
+// RUN: -mabi=lp64f -### 2>&1 | FileCheck %s --check-prefix=RISCV
----------------
This isn't a great test, anything that unconditionally passes `-plugin-opt=target-abi=lp64f` passes it. Test RV32 vs RV64 and with multiple ABIs for each to have confidence it does the right thing. Also have a test for not passing anything.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71387/new/
https://reviews.llvm.org/D71387
More information about the cfe-commits
mailing list