diff --git a/llvm-bolt.spec b/llvm-bolt.spec index 9e2747d34b972ea65ed97ab967fd9bd4ff194774..c888a237ba6060a9dc530164c8bb3d380ce7ed1e 100644 --- a/llvm-bolt.spec +++ b/llvm-bolt.spec @@ -1,6 +1,6 @@ %bcond_without sys_llvm %bcond_with check -%bcond_without toolchain_clang +%bcond_with toolchain_clang %if %{with toolchain_clang} %global toolchain clang @@ -27,9 +27,9 @@ Name: %{pkg_name} Version: %{bolt_version} -Release: 2 +Release: 3 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 @@ -99,45 +99,32 @@ Documentation for the BOLT optimizer # Set LD_LIBRARY_PATH now because we skip rpath generation and the build uses # some just built libraries. -export LD_LIBRARY_PATH=%{_builddir}/%{bolt_srcdir}/%{_vpath_builddir}/%{_lib} -%ninja_build bolt +export LD_LIBRARY_PATH=%{_builddir}/%{bolt_srcdir}/%{__cmake_builddir}/%{_lib} +%cmake_build --target bolt %install -%ninja_install bolt - -# Remove extera llvm files. -find %{buildroot}%{install_prefix} \ - ! -name "llvm-bolt" \ - ! -name "merge-fdata" \ - ! -name "perf2bolt" \ - ! -name "llvm-boltdiff" \ - ! -name "llvm-bolt-heatmap" \ - ! -name "libbolt_rt_hugify.a" \ - ! -name "libbolt_rt_instr.a" \ - -type f,l -exec rm -f '{}' \; - +%cmake_install --component bolt # Remove files installed during the build phase. -rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{_vpath_builddir}/%{_lib}/lib*.a +rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{__cmake_builddir}/%{_lib}/lib*.a # There currently is not support upstream for building html doc from BOLT 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 %endif -export LD_LIBRARY_PATH=%{_builddir}/%{bolt_srcdir}//%{_vpath_builddir}/%{_lib} +export LD_LIBRARY_PATH=%{_builddir}/%{bolt_srcdir}//%{__cmake_builddir}/%{_lib} export DESTDIR=%{buildroot} -%ninja_build check-bolt +%cmake_build --target check-bolt # Remove files installed during the check phase. -rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{_vpath_builddir}/%{_lib}/lib*.a +rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{__cmake_builddir}/%{_lib}/lib*.a %endif %files @@ -151,15 +138,17 @@ rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{_vpath_builddir}/%{_lib}/lib*.a %ifarch x86_64 %{install_libdir}/libbolt_rt_hugify.a %{install_libdir}/libbolt_rt_instr.a +%{install_libdir}/libbolt_rt_instr_osx.a %endif -%exclude %{_builddir}/%{bolt_srcdir}/lib/* - %files doc %doc %{install_docdir} %changelog +* Tue Nov 12 2024 Funda Wang - 17.0.6-3 +- adopt to new cmake macro + * Fri Jul 5 2024 liyunfei - 17.0.6-2 - Add toolchain_clang build support @@ -182,4 +171,4 @@ rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{_vpath_builddir}/%{_lib}/lib*.a - Type:Init - ID:NA - SUG:NA -- DESC:Init llvm-bolt repository \ No newline at end of file +- DESC:Init llvm-bolt repository 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: .