init for Multi-Version LLVM-18.1.8
Signed-off-by: liyunfei <liyunfei33@huawei.com>
This commit is contained in:
parent
e4a863997f
commit
5fe821c116
21
README.en.md
21
README.en.md
@ -1,9 +1,22 @@
|
||||
# llvm-bolt
|
||||
# llvm-bolt-latest
|
||||
|
||||
#### 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.
|
||||
llvm-bolt is a post-link optimizer developed to speed up large applications
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
|
||||
22
README.md
22
README.md
@ -1,9 +1,23 @@
|
||||
# llvm-bolt
|
||||
# llvm-bolt-latest
|
||||
|
||||
#### 介绍
|
||||
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.
|
||||
llvm-bolt is a post-link optimizer developed to speed up large applications
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
|
||||
@ -1,35 +1,33 @@
|
||||
%bcond_without sys_llvm
|
||||
%bcond_with check
|
||||
%bcond_with toolchain_clang
|
||||
%bcond_without toolchain_clang
|
||||
|
||||
%if %{with toolchain_clang}
|
||||
%global toolchain clang
|
||||
%endif
|
||||
|
||||
%global maj_ver 17
|
||||
%global min_ver 0
|
||||
%global patch_ver 6
|
||||
%global maj_ver 18
|
||||
%global min_ver 1
|
||||
%global patch_ver 8
|
||||
%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 _scl_prefix /opt/openEuler
|
||||
%{?scl:%scl_package %scl}
|
||||
%{!?scl:%global scl_prefix llvm-toolset-%{maj_ver}-}
|
||||
%{!?scl:%global pkg_name %{name}}
|
||||
%global install_prefix %{!?scl:%{_scl_prefix}/llvm-toolset-%{maj_ver}/root}%{_prefix}
|
||||
%global install_datadir %{!?scl:%{_scl_prefix}/llvm-toolset-%{maj_ver}/root}%{_datadir}
|
||||
|
||||
%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}
|
||||
Name: %{?scl_prefix}llvm-bolt
|
||||
Version: %{bolt_version}
|
||||
Release: 3
|
||||
Release: 1
|
||||
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 +50,8 @@ BuildRequires: doxygen
|
||||
BuildRequires: clang
|
||||
%endif
|
||||
|
||||
%{?scl:Requires: %scl_runtime}
|
||||
|
||||
%description
|
||||
BOLT is a post-link optimizer developed to speed up large applications.
|
||||
It achieves the improvements by optimizing application's code layout based
|
||||
@ -60,8 +60,8 @@ on execution profile gathered by sampling profiler, such as Linux perf tool.
|
||||
%package doc
|
||||
Summary: Documentation for BOLT
|
||||
BuildArch: noarch
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
Requires: %{pkg_name} = %{version}-%{release}
|
||||
|
||||
%description doc
|
||||
Documentation for the BOLT optimizer
|
||||
|
||||
@ -99,32 +99,45 @@ 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}/%{__cmake_builddir}/%{_lib}
|
||||
%cmake_build --target bolt
|
||||
export LD_LIBRARY_PATH=%{_builddir}/%{bolt_srcdir}/%{_vpath_builddir}/%{_lib}
|
||||
%ninja_build bolt
|
||||
|
||||
%install
|
||||
%cmake_install --component bolt
|
||||
%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}/%{__cmake_builddir}/%{_lib}/lib*.a
|
||||
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}
|
||||
|
||||
%if %{with check}
|
||||
%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}//%{__cmake_builddir}/%{_lib}
|
||||
export LD_LIBRARY_PATH=%{_builddir}/%{bolt_srcdir}//%{_vpath_builddir}/%{_lib}
|
||||
export DESTDIR=%{buildroot}
|
||||
%cmake_build --target check-bolt
|
||||
%ninja_build check-bolt
|
||||
|
||||
# Remove files installed during the check phase.
|
||||
rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{__cmake_builddir}/%{_lib}/lib*.a
|
||||
rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{_vpath_builddir}/%{_lib}/lib*.a
|
||||
%endif
|
||||
|
||||
%files
|
||||
@ -135,19 +148,17 @@ rm -f %{buildroot}/%{_builddir}/%{bolt_srcdir}/%{__cmake_builddir}/%{_lib}/lib*.
|
||||
%{install_bindir}/perf2bolt
|
||||
%{install_bindir}/llvm-bolt-heatmap
|
||||
|
||||
%ifarch x86_64
|
||||
%{install_libdir}/libbolt_rt_hugify.a
|
||||
%{install_libdir}/libbolt_rt_instr.a
|
||||
%if %{with toolchain_clang}
|
||||
%{install_libdir}/libbolt_rt_instr_osx.a
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
%doc %{install_docdir}
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Dec 6 2024 liyunfei <liyunfei33@huawei.com> - 18.1.8-1
|
||||
- init for Multi-Version LLVM-18.1.8
|
||||
|
||||
* Tue Nov 12 2024 Funda Wang <fundawang@yeah.net> - 17.0.6-3
|
||||
- adopt to new cmake macro
|
||||
- build with gcc now, as llvm/clang will produce linking error
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
llvm-project-18.1.8.src.tar.xz.sig
Normal file
BIN
llvm-project-18.1.8.src.tar.xz.sig
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user