Update to LLVM 17.0.6
1. Split off llvm-cmake-utils package 2. Add llvm-gtest
This commit is contained in:
parent
8963f68e84
commit
86c99e1e49
BIN
cmake-17.0.6.src.tar.xz
Normal file
BIN
cmake-17.0.6.src.tar.xz
Normal file
Binary file not shown.
Binary file not shown.
58
llvm.spec
58
llvm.spec
@ -1,16 +1,18 @@
|
||||
%bcond_with sys_llvm
|
||||
%bcond_with check
|
||||
%bcond_without sys_llvm
|
||||
%bcond_without check
|
||||
|
||||
%global maj_ver 12
|
||||
%global maj_ver 17
|
||||
%global min_ver 0
|
||||
%global patch_ver 1
|
||||
%global patch_ver 6
|
||||
|
||||
%if %{with sys_llvm}
|
||||
%global pkg_name llvm
|
||||
%global install_prefix %{_prefix}
|
||||
%global install_datadir %{_datadir}
|
||||
%else
|
||||
%global pkg_name llvm%{maj_ver}
|
||||
%global install_prefix %{_libdir}/%{name}
|
||||
%global install_datadir %{install_prefix}/share
|
||||
%endif
|
||||
|
||||
%global install_bindir %{install_prefix}/bin
|
||||
@ -35,12 +37,14 @@
|
||||
|
||||
Name: %{pkg_name}
|
||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||
Release: 7
|
||||
Release: 1
|
||||
Summary: The Low Level Virtual Machine
|
||||
|
||||
License: NCSA
|
||||
URL: http://llvm.org
|
||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/llvm-%{version}.src.tar.xz
|
||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cmake-%{version}.src.tar.xz
|
||||
Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/third-party-%{version}.src.tar.xz
|
||||
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: cmake
|
||||
@ -75,6 +79,11 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: libedit-devel
|
||||
Requires: %{name}-static%{?_isa} = %{version}-%{release}
|
||||
|
||||
%if %{with sys_llvm}
|
||||
Requires: %{name}-test%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-googletest%{?_isa} = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
Requires(post): %{_sbindir}/alternatives
|
||||
Requires(postun): %{_sbindir}/alternatives
|
||||
|
||||
@ -107,6 +116,13 @@ Provides: llvm-static(major) = %{maj_ver}
|
||||
%description static
|
||||
Static libraries for the LLVM compiler infrastructure.
|
||||
|
||||
%package cmake-utils
|
||||
Summary: CMake shared utilities
|
||||
|
||||
%description cmake-utils
|
||||
CMake moudules shared between LLVM projects at buid time.
|
||||
This is for internal use by LLVM packages only.
|
||||
|
||||
%package test
|
||||
Summary: LLVM regression tests
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
@ -124,7 +140,14 @@ Summary: LLVM's modified googletest sources
|
||||
LLVM's modified googletest sources.
|
||||
|
||||
%prep
|
||||
%setup -T -q -b 1 -n cmake-%{version}.src
|
||||
cd ..
|
||||
mv cmake-%{version}.src cmake
|
||||
%setup -T -q -b 2 -n third-party-%{version}.src
|
||||
cd ..
|
||||
mv third-party-%{version}.src third-party
|
||||
%setup -T -q -b 0 -n llvm-%{version}.src
|
||||
%autopatch -p2
|
||||
|
||||
pathfix.py -i %{__python3} -pn \
|
||||
test/BugPoint/compile-custom.ll.py \
|
||||
@ -153,6 +176,11 @@ cd _build
|
||||
-DLLVM_BUILD_TOOLS:BOOL=ON \
|
||||
-DLLVM_INCLUDE_TESTS:BOOL=ON \
|
||||
-DLLVM_BUILD_TESTS:BOOL=ON \
|
||||
%if %{with sys_llvm}
|
||||
-DLLVM_INSTALL_GTEST:BOOL=ON \
|
||||
%else
|
||||
-DLLVM_INSTALL_GTEST:BOOL=OFF \
|
||||
%endif
|
||||
-DLLVM_LIT_ARGS=-v \
|
||||
-DLLVM_INCLUDE_EXAMPLES:BOOL=ON \
|
||||
-DLLVM_BUILD_EXAMPLES:BOOL=OFF \
|
||||
@ -194,14 +222,16 @@ done
|
||||
|
||||
%if 0%{?__isa_bits} == 64
|
||||
install %{_builddir}/llvm-%{version}.src/_build/lib64/libLLVMTestingSupport.a %{buildroot}%{install_libdir}
|
||||
install %{_builddir}/llvm-%{version}.src/_build/lib64/libLLVMTestingAnnotations.a %{buildroot}%{install_libdir}
|
||||
%else
|
||||
install %{_builddir}/llvm-%{version}.src/_build/lib/libLLVMTestingSupport.a %{buildroot}%{install_libdir}
|
||||
install %{_builddir}/llvm-%{version}.src/_build/lib/libLLVMTestingAnnotations.a %{buildroot}%{install_libdir}
|
||||
%endif
|
||||
|
||||
# Install gtest sources so clang can use them for gtest
|
||||
install -d %{buildroot}%{install_srcdir}
|
||||
install -d %{buildroot}%{install_srcdir}/utils/
|
||||
cp -R %{_builddir}/llvm-%{version}.src/utils/unittest %{buildroot}%{install_srcdir}/utils/
|
||||
cp -R ../third-party/unittest %{buildroot}%{install_srcdir}/utils/
|
||||
|
||||
# Clang needs these for running lit tests.
|
||||
cp %{_builddir}/llvm-%{version}.src/utils/update_cc_test_checks.py %{buildroot}%{install_srcdir}/utils/
|
||||
@ -224,6 +254,9 @@ EOF
|
||||
# Remove opt-viewer, since this is just a compatibility package.
|
||||
rm -Rf %{build_install_prefix}/share/opt-viewer
|
||||
|
||||
mkdir -p %{buildroot}%{install_datadir}/llvm/cmake
|
||||
cp -Rv ../cmake/* %{buildroot}%{install_datadir}/llvm/cmake
|
||||
|
||||
%check
|
||||
%if %{with check}
|
||||
LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build/
|
||||
@ -268,6 +301,11 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build
|
||||
%license LICENSE.TXT
|
||||
%{install_libdir}/*.a
|
||||
%exclude %{install_libdir}/libLLVMTestingSupport.a
|
||||
%exclude %{install_libdir}/libLLVMTestingAnnotations.a
|
||||
|
||||
%files cmake-utils
|
||||
%license LICENSE.TXT
|
||||
%{install_datadir}/llvm/cmake
|
||||
|
||||
%files test
|
||||
%license LICENSE.TXT
|
||||
@ -282,8 +320,16 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build
|
||||
%license LICENSE.TXT
|
||||
%{install_srcdir}/utils
|
||||
%{install_libdir}/libLLVMTestingSupport.a
|
||||
%{install_libdir}/libLLVMTestingAnnotations.a
|
||||
%{install_libdir}/libllvm_gtest.a
|
||||
%{install_libdir}/libllvm_gtest_main.a
|
||||
%{install_includedir}/llvm-gtest
|
||||
%{install_includedir}/llvm-gmock
|
||||
|
||||
%changelog
|
||||
* Thu Nov 30 2023 zhoujing <zhoujing106@huawei.com> - 17.0.6-1
|
||||
- Update to 17.0.6
|
||||
|
||||
* Tue Jul 13 2023 cf-zhao <zhaochuanfeng@huawei.com> -12.0.1-7
|
||||
- Disable check.
|
||||
|
||||
|
||||
BIN
third-party-17.0.6.src.tar.xz
Normal file
BIN
third-party-17.0.6.src.tar.xz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user