diff --git a/llvm-bolt.spec b/llvm-bolt.spec index 974bd8e4bc7a567ad9e6f927395abe943d05f94c..9034080d0033866c0c10a1d3304095f4b71d9e66 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,9 +27,9 @@ Name: %{pkg_name} Version: %{bolt_version} -Release: 6 +Release: 7 Summary: BOLT is a post-link optimizer developed to speed up large applications -License: Apache 2.0 +License: Apache-2.0 URL: https://github.com/llvm/llvm-project/tree/main/bolt Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{bolt_version}/%{bolt_srcdir}.tar.xz @@ -52,6 +57,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. @@ -86,6 +94,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 @@ -123,9 +135,8 @@ rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{_vpath_builddir}/%{_lib}/lib*.a install -d %{buildroot}%{install_docdir} mv bolt/README.md bolt/docs/*.md %{buildroot}%{install_docdir} -%check - %if %{with check} +%check %ifarch aarch64 # Failing test cases on aarch64 rm bolt/test/cache+-deprecated.test bolt/test/bolt-icf.test bolt/test/R_ABS.pic.lld.cpp @@ -147,19 +158,28 @@ rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{_vpath_builddir}/%{_lib}/lib*.a %{install_bindir}/perf2bolt %{install_bindir}/llvm-bolt-heatmap -%ifnarch riscv64 loongarch64 +%ifarch aarch64 %{install_libdir}/libbolt_rt_instr.a %endif + %ifarch x86_64 %{install_libdir}/libbolt_rt_hugify.a +%{install_libdir}/libbolt_rt_instr.a %endif -%exclude %{_builddir}/%{bolt_srcdir}/lib/* - %files doc %doc %{install_docdir} %changelog +* Sat Aug 30 2025 eastb233 17.0.6-7 +- Type: cherry-pick +- ID:NA +- SUG:NA +- DESC: cherry-pick +- Add toolchain_clang build support +- Part of adopt to new cmake macro +- build with clang + * Thu May 22 2025 rfwang07 17.0.6-6 - Type:backport - ID:NA diff --git a/llvm-bolt.yaml b/llvm-bolt.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c7c50f6ac87dd806f0574c6b3a4fd97b11d3e479 --- /dev/null +++ b/llvm-bolt.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: llvm/llvm-project +tag_prefix: ^llvmorg- +separator: .