diff --git a/llvm-bolt.spec b/llvm-bolt.spec index 1be40dc137f07cbb590ff7f3c7738f40bd559ee3..9e2747d34b972ea65ed97ab967fd9bd4ff194774 100644 --- a/llvm-bolt.spec +++ b/llvm-bolt.spec @@ -1,5 +1,10 @@ %bcond_without sys_llvm %bcond_with check +%bcond_without toolchain_clang + +%if %{with toolchain_clang} +%global toolchain clang +%endif %global maj_ver 17 %global min_ver 0 @@ -22,7 +27,7 @@ Name: %{pkg_name} Version: %{bolt_version} -Release: 1 +Release: 2 Summary: BOLT is a post-link optimizer developed to speed up large applications License: Apache 2.0 URL: https://github.com/llvm/llvm-project/tree/main/bolt @@ -43,6 +48,9 @@ BuildRequires: zlib-devel BuildRequires: python3-lit BuildRequires: python3-psutil BuildRequires: doxygen +%if %{with toolchain_clang} +BuildRequires: clang +%endif %description BOLT is a post-link optimizer developed to speed up large applications. @@ -77,6 +85,10 @@ Documentation for the BOLT optimizer -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ -DLLVM_ENABLE_PROJECTS="bolt" \ -DLLVM_PARALLEL_LINK_JOBS=%{max_link_jobs} \ +%if "%{toolchain}" == "clang" + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ +%endif %ifarch %ix86 x86_64 -DLLVM_TARGETS_TO_BUILD="X86" %endif @@ -148,6 +160,9 @@ rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{_vpath_builddir}/%{_lib}/lib*.a %changelog +* Fri Jul 5 2024 liyunfei - 17.0.6-2 +- Add toolchain_clang build support + * Mon Dec 4 2023 zhoujing 17.0.6-1 - Update to 17.0.6