Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
784cf1e30d
!34 [sync] PR-33: Remove unused patch file.
From: @openeuler-sync-bot 
Reviewed-by: @cf-zhao 
Signed-off-by: @cf-zhao
2024-04-12 06:43:47 +00:00
xiongzhou4
af9539dc42 Remove unused patch file.
(cherry picked from commit a9528f0cef012e26857bd651b32540cdfd839fd2)
2024-04-12 09:40:30 +08:00
openeuler-ci-bot
cf08a58b30
!30 Update to 17.0.6
From: @zj94 
Reviewed-by: @liyunfei33, @cf-zhao 
Signed-off-by: @cf-zhao
2024-01-05 03:35:22 +00:00
zhoujing
9158689dc9 Update to 17.0.6 2023-12-11 14:36:59 +08:00
openeuler-ci-bot
31f1d88290
!6 [Backport] [BOLT] [AArch64] Handle data at the beginning of a function when disassembling and building CFG.
From: @xiongzhou4 
Reviewed-by: @li-yancheng 
Signed-off-by: @li-yancheng
2023-06-21 02:00:55 +00:00
xiongzhou4
98f073d7a1 [Backport] [BOLT] [AArch64] Handle data at the beginning of a function when disassembling and building CFG. 2023-06-16 09:28:39 +08:00
openeuler-ci-bot
113bb21561
!5 [sync] PR-3: [RPM] Add debuginfo package and delete rpath in binary
From: @openeuler-sync-bot 
Reviewed-by: @eastb233 
Signed-off-by: @eastb233
2022-12-21 02:22:07 +00:00
liyancheng
a4a5d65ff0 [RPM] Add debuginfo package and delete rpath in binary
1. Add debuginfo package
2. Delete rpath in binary

(cherry picked from commit 4aaa5f7557443575b0398d8d0e144b2358f6ea7d)
2022-12-20 15:02:17 +08:00
openeuler-ci-bot
acaa5ac1aa !2 初始化llvm-bolt仓库
Merge pull request !2 from 编译小伙/master
2021-12-17 06:55:08 +00:00
LiYanCheng
0f9d046ac2 init repository 2021-11-29 15:55:32 +08:00
5 changed files with 176 additions and 33 deletions

View File

@ -1,22 +1,9 @@
# llvm-bolt # llvm-bolt
#### Description #### Description
llvm-bolt is a post-link optimizer developed to speed up large applications BOLT is a post-link optimizer developed to speed up large applications.
It achieves the improvements by optimizing application's code layout based
#### Software Architecture on execution profile gathered by sampling profiler, such as Linux perf tool.
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution #### Contribution

View File

@ -1,23 +1,9 @@
# llvm-bolt # llvm-bolt
#### 介绍 #### 介绍
llvm-bolt is a post-link optimizer developed to speed up large applications BOLT is a post-link optimizer developed to speed up large applications.
It achieves the improvements by optimizing application's code layout based
#### 软件架构 on execution profile gathered by sampling profiler, such as Linux perf tool.
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献 #### 参与贡献

170
llvm-bolt.spec Normal file
View File

@ -0,0 +1,170 @@
%bcond_without sys_llvm
%bcond_with check
%global maj_ver 17
%global min_ver 0
%global patch_ver 6
%global bolt_version %{maj_ver}.%{min_ver}.%{patch_ver}
%global bolt_srcdir llvm-project-%{bolt_version}.src
%if %{with sys_llvm}
%global pkg_name llvm-bolt
%global install_prefix %{_prefix}
%else
%global pkg_name llvm-bolt%{maj_ver}
%global install_prefix %{_libdir}/llvm%{maj_ver}
%endif
%global install_bindir %{install_prefix}/bin
%global install_libdir %{install_prefix}/lib
%global install_docdir %{install_prefix}/share/doc
%global max_link_jobs 2
Name: %{pkg_name}
Version: %{bolt_version}
Release: 1
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
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{bolt_version}/%{bolt_srcdir}.tar.xz
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{bolt_version}/%{bolt_srcdir}.tar.xz.sig
# BOLT is not respecting the component split of LLVM and requires some private
# headers in order to compile itself. Try to disable as much libraries as
# possible in order to reduce build time.
#Patch0: rm-llvm-libs.diff
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: zlib-devel
BuildRequires: python3-lit
BuildRequires: python3-psutil
BuildRequires: doxygen
%description
BOLT is a post-link optimizer developed to speed up large applications.
It achieves the improvements by optimizing application's code layout based
on execution profile gathered by sampling profiler, such as Linux perf tool.
%package doc
Summary: Documentation for BOLT
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
%description doc
Documentation for the BOLT optimizer
%prep
%autosetup -n %{bolt_srcdir} -p1
%build
%{cmake} -G Ninja -S llvm \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
-DCMAKE_SKIP_RPATH=ON \
-DLLVM_DIR=%{install_libdir}/cmake/llvm \
-DLLVM_TABLEGEN_EXE=%{install_bindir}/llvm-tblgen \
-DLLVM_BUILD_UTILS:BOOL=ON \
-DBOLT_INCLUDE_DOCS:BOOL=ON \
-DLLVM_INCLUDE_TESTS:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_LINK_LLVM_DYLIB:BOOL=OFF \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DBOLT_INCLUDE_TESTS:BOOL=ON \
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
-DLLVM_ENABLE_PROJECTS="bolt" \
-DLLVM_PARALLEL_LINK_JOBS=%{max_link_jobs} \
%ifarch %ix86 x86_64
-DLLVM_TARGETS_TO_BUILD="X86"
%endif
%ifarch aarch64
-DLLVM_TARGETS_TO_BUILD="AArch64"
%endif
# 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
%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 '{}' \;
# Remove files installed during the build phase.
rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{_vpath_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}
%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 DESTDIR=%{buildroot}
%ninja_build check-bolt
# Remove files installed during the check phase.
rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{_vpath_builddir}/%{_lib}/lib*.a
%endif
%files
%license bolt/LICENSE.TXT
%{install_bindir}/llvm-bolt
%{install_bindir}/llvm-boltdiff
%{install_bindir}/merge-fdata
%{install_bindir}/perf2bolt
%{install_bindir}/llvm-bolt-heatmap
%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
* Mon Dec 4 2023 zhoujing <zhoujing106@huawei.com> 17.0.6-1
- Update to 17.0.6
* Thu Jun 15 2023 Xiong Zhou <xiongzhou4@huawei.com> 0-2.20211016.gitb72f753
- Type:backport
- ID:NA
- SUG:NA
- DESC: Handle data at the beginning of a function when disassembling and building CFG.
* Mon Dec 19 2022 liyancheng <412998149@qq.com> 0-1.20211016.gitb72f753
- Type:fix
- ID:NA
- SUG:NA
- DESC: Add debuginfo package and delete rpath in binary
* Mon Nov 29 2021 liyancheng <412998149@qq.com>
- Type:Init
- ID:NA
- SUG:NA
- DESC:Init llvm-bolt repository

Binary file not shown.

Binary file not shown.