[llvm] [RISCV][SLEEF]: Support SLEEF vector library for RISC-V target. (PR #114014)
Mikhail R. Gadelha via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 10:18:48 PST 2024
mikhailramalho wrote:
@mga-sc I'm trying to run some experiments with your PR and will post as soon as they are done, but can I ask you to add the following code to your PR? So that clang can accept -fveclib=SLEEF when building for riscv64
```
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 0952262c3601..04f4f0522618 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -5804,7 +5804,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
<< Name << Triple.getArchName();
} else if (Name == "SLEEF" || Name == "ArmPL") {
if (Triple.getArch() != llvm::Triple::aarch64 &&
- Triple.getArch() != llvm::Triple::aarch64_be)
+ Triple.getArch() != llvm::Triple::aarch64_be &&
+ Triple.getArch() != llvm::Triple::riscv64)
D.Diag(diag::err_drv_unsupported_opt_for_target)
<< Name << Triple.getArchName();
}
```
https://github.com/llvm/llvm-project/pull/114014
More information about the llvm-commits
mailing list