diff --git a/README.en.md b/README.en.md index 485d5a3ffa58191f8cc35faad18bbafd4e66ab0f..8dd09c95ec46000de00924df633d63ff3bc950ef 100644 --- a/README.en.md +++ b/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 diff --git a/README.md b/README.md index 1e836ceb9aab2e8b5e57a1f52e41c6f77d7d1bcd..02e75cab485e1b333714917cd0ccce3cb8db74fd 100644 --- a/README.md +++ b/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 #### 参与贡献 diff --git a/llvm-bolt.spec b/llvm-bolt.spec index d83d218f9292d6c26303cacd0ae11422196535d9..8433173d3dca9df75cc26f7026f977782ed08e3a 100644 --- a/llvm-bolt.spec +++ b/llvm-bolt.spec @@ -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 - 18.1.8-1 +- init for Multi-Version LLVM-18.1.8 + * Tue Nov 12 2024 Funda Wang - 17.0.6-3 - adopt to new cmake macro - build with gcc now, as llvm/clang will produce linking error diff --git a/llvm-project-17.0.6.src.tar.xz.sig b/llvm-project-17.0.6.src.tar.xz.sig deleted file mode 100644 index 59c3713127177606f6f6d95bf61790e3d7ad15cf..0000000000000000000000000000000000000000 Binary files a/llvm-project-17.0.6.src.tar.xz.sig and /dev/null differ diff --git a/llvm-project-17.0.6.src.tar.xz b/llvm-project-18.1.8.src.tar.xz similarity index 85% rename from llvm-project-17.0.6.src.tar.xz rename to llvm-project-18.1.8.src.tar.xz index cdcb13184e9bf3d86998f2e0f937d3a6e15da999..f5cb7e100ca0667787c0706f277ac2e163c38129 100644 Binary files a/llvm-project-17.0.6.src.tar.xz and b/llvm-project-18.1.8.src.tar.xz differ diff --git a/llvm-project-18.1.8.src.tar.xz.sig b/llvm-project-18.1.8.src.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000..5a2b6341695910c09c7e748cd717940d0c52b107 Binary files /dev/null and b/llvm-project-18.1.8.src.tar.xz.sig differ