mga-sc 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();
>      }
> ```

Add clang support. Also add test to fveclib.c to check. 

https://github.com/llvm/llvm-project/pull/114014
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to