diff --git a/lld.spec b/lld.spec index f777bdcccb7f9b7be1c251ef02616e68e4d50612..877352a36472f5c1e5f52814813e15d1089a3940 100644 --- a/lld.spec +++ b/lld.spec @@ -1,5 +1,10 @@ %bcond_without sys_llvm %bcond_without check +%bcond_without toolchain_clang + +%if %{with toolchain_clang} +%global toolchain clang +%endif %global maj_ver 17 %global min_ver 0 @@ -32,7 +37,7 @@ Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 2 +Release: 3 Summary: The LLVM Linker License: NCSA @@ -104,6 +109,10 @@ cd _build -DLLVM_LIT_ARGS="-sv \ --path %{install_prefix}" \ -DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \ +%if "%{toolchain}" == "clang" + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ +%endif -DLLVM_MAIN_SRC_DIR=%{install_prefix}/src %ninja_build @@ -131,6 +140,9 @@ rm %{buildroot}%{install_includedir}/mach-o/compact_unwind_encoding.h %{install_libdir}/liblld*.so.* %changelog +* Fri Jul 5 2024 liyunfei - 17.0.6-3 +- Add toolchain_clang build support + * Mon Mar 25 2024 zhanglimin - 17.0.6-2 - Supoort `relax` feature on LoongArch