From 215a7f48877076007ef041206765ccd80e59935d Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sun, 17 Nov 2024 21:09:53 +0800 Subject: [PATCH 1/2] adopt to new cmake macro --- llvm-bolt.spec | 41 +++++++++++++++-------------------------- llvm-bolt.yaml | 4 ++++ 2 files changed, 19 insertions(+), 26 deletions(-) create mode 100644 llvm-bolt.yaml diff --git a/llvm-bolt.spec b/llvm-bolt.spec index 9e2747d..b4b694d 100644 --- a/llvm-bolt.spec +++ b/llvm-bolt.spec @@ -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 0000000..c7c50f6 --- /dev/null +++ b/llvm-bolt.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: llvm/llvm-project +tag_prefix: ^llvmorg- +separator: . -- Gitee From e8efcf06f78d974558a1e77208cc509871d2783b Mon Sep 17 00:00:00 2001 From: liyunfei Date: Mon, 25 Nov 2024 11:36:47 +0000 Subject: [PATCH 2/2] update llvm-bolt.spec. Signed-off-by: liyunfei --- llvm-bolt.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm-bolt.spec b/llvm-bolt.spec index b4b694d..c888a23 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 -- Gitee