Blame mlir.spec

8d5a0fe
#%%global rc_ver 2
8d5a0fe
%global baserelease 3
46f2fcd
%global maj_ver 11
46f2fcd
%global min_ver 0
b70a71d
%global patch_ver 1
b70a71d
%global mlir_srcdir llvm-project-%{version}%{?rc_ver:rc%{rc_ver}}.src
46f2fcd
46f2fcd
Name: mlir
46f2fcd
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
46f2fcd
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
46f2fcd
Summary: Multi-Level Intermediate Representation Overview
46f2fcd
46f2fcd
License: ASL 2.0 with exceptions
46f2fcd
URL: http://mlir.llvm.org
46f2fcd
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{mlir_srcdir}.tar.xz
46f2fcd
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{mlir_srcdir}.tar.xz.sig
b70a71d
Source2: tstellar-gpg-key.asc
46f2fcd
46f2fcd
# Support standalone build (MLIR is usually built as part of LLVM)
46f2fcd
Patch0: mlir-cmake-standalone.patch
46f2fcd
46f2fcd
# Unexpected linking error: neither -j1, disabling lto, LD_LIBRARY_PATH, rpath work 
46f2fcd
ExcludeArch: armv7hl
46f2fcd
46f2fcd
BuildRequires: gcc
46f2fcd
BuildRequires: gcc-c++
46f2fcd
BuildRequires: cmake
46f2fcd
BuildRequires: zlib-devel
46f2fcd
BuildRequires: llvm-devel = %{version}
46f2fcd
BuildRequires: llvm-test = %{version}
46f2fcd
46f2fcd
# For origin certification
46f2fcd
BuildRequires: gnupg2
46f2fcd
46f2fcd
%description
46f2fcd
The MLIR project is a novel approach to building reusable and extensible
46f2fcd
compiler infrastructure. MLIR aims to address software fragmentation,
46f2fcd
improve compilation for heterogeneous hardware, significantly reduce
46f2fcd
the cost of building domain specific compilers, and aid in connecting
46f2fcd
existing compilers together.
46f2fcd
46f2fcd
%package static
46f2fcd
Summary: MLIR static files
46f2fcd
Requires: %{name}%{?_isa} = %{version}-%{release}
46f2fcd
46f2fcd
%description static
46f2fcd
MLIR static files.
46f2fcd
46f2fcd
%package devel
46f2fcd
Summary: MLIR development files
46f2fcd
Requires: %{name}-static%{?_isa} = %{version}-%{release}
46f2fcd
46f2fcd
%description devel
46f2fcd
MLIR development files.
46f2fcd
46f2fcd
%prep
46f2fcd
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
46f2fcd
%autosetup -n %{mlir_srcdir}/%{name} -p2
46f2fcd
# remove all but keep mlir
46f2fcd
find ../* -maxdepth 0 ! -name '%{name}' -exec rm -rf {} +
46f2fcd
46f2fcd
46f2fcd
%build
46f2fcd
%cmake  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
46f2fcd
        -DCMAKE_SKIP_RPATH=ON \
46f2fcd
        -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
46f2fcd
        -DCMAKE_PREFIX_PATH=%{_libdir}/cmake/llvm/ \
13b0577
	-DLLVM_BUILD_UTILS:BOOL=ON \
46f2fcd
        -DMLIR_INCLUDE_DOCS:BOOL=ON \
46f2fcd
        -DMLIR_INCLUDE_TESTS:BOOL=OFF \
46f2fcd
        -DMLIR_INCLUDE_INTEGRATION_TESTS:BOOL=OFF \
46f2fcd
%if 0%{?__isa_bits} == 64
46f2fcd
        -DLLVM_LIBDIR_SUFFIX=64
46f2fcd
%else
46f2fcd
        -DLLVM_LIBDIR_SUFFIX=
46f2fcd
%endif
46f2fcd
# build process .exe tools normally use rpath or static linkage
46f2fcd
export LD_LIBRARY_PATH=%{_builddir}/%{mlir_srcdir}/%{name}/%{_build}/bin
46f2fcd
%cmake_build
46f2fcd
46f2fcd
46f2fcd
%install
46f2fcd
%cmake_install
46f2fcd
46f2fcd
%check
46f2fcd
# build process .exe tools normally use rpath or static linkage
46f2fcd
%cmake_build --target check-mlir || true
46f2fcd
46f2fcd
%files
46f2fcd
%license LICENSE.TXT
46f2fcd
%{_libdir}/libMLIR*.so.%{maj_ver}*
46f2fcd
%{_libdir}/libmlir_runner_utils.so.%{maj_ver}*
46f2fcd
%{_libdir}/libmlir_c_runner_utils.so.%{maj_ver}*
46f2fcd
%{_libdir}/libmlir_c_runner_utils_static.so.%{maj_ver}*
46f2fcd
46f2fcd
%files static
46f2fcd
%{_libdir}/libMLIR*.a
46f2fcd
46f2fcd
%files devel
13b0577
%{_bindir}/mlir-tblgen
46f2fcd
%{_libdir}/libMLIR*.so
46f2fcd
%{_libdir}/libmlir_runner_utils.so
46f2fcd
%{_libdir}/libmlir_c_runner_utils.so
46f2fcd
%{_libdir}/libmlir_c_runner_utils_static.so
46f2fcd
%{_includedir}/mlir
46f2fcd
%{_includedir}/mlir-c
46f2fcd
%{_libdir}/cmake/mlir
46f2fcd
46f2fcd
%changelog
8d5a0fe
* Wed Jan 06 2021 Serge Guelton - 11.0.1-3
8d5a0fe
- LLVM 11.0.1 final
8d5a0fe
c867640
* Tue Dec 22 2020 sguelton@redhat.com - 11.0.1-2.rc2
c867640
- llvm 11.0.1-rc2
c867640
b70a71d
* Tue Dec 01 2020 sguelton@redhat.com - 11.0.1-1.rc1
b70a71d
- llvm 11.0.1-rc1
b70a71d
9decca0
* Thu Oct 15 2020 sguelton@redhat.com - 11.0.0-1
9decca0
- Fix NVR
9decca0
67b7499
* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.6
67b7499
- llvm 11.0.0 - final release
67b7499
b83dab0
* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.5.rc6
b83dab0
- 11.0.0-rc6
b83dab0
49750f5
* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.4.rc5
49750f5
- 11.0.0-rc5 Release
49750f5
e8e01c4
* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.3.rc3
e8e01c4
- Fix NVR
e8e01c4
a03fa16
* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3
a03fa16
- 11.0.0-rc3 Release
a03fa16
13b0577
* Wed Sep 02 2020 sguelton@redhat.com - 11.0.0-0.2.rc2
13b0577
- Package mlir-tblgen
13b0577
46f2fcd
* Wed Aug 12 2020 Cristian Balint <cristian.balint@gmail.com> - 11.0.0-0.1.rc1
46f2fcd
- Initial version.
46f2fcd