|
|
46f2fcd |
%global rc_ver 2
|
|
|
13b0577 |
%global baserelease 0.2
|
|
|
46f2fcd |
%global maj_ver 11
|
|
|
46f2fcd |
%global min_ver 0
|
|
|
46f2fcd |
%global patch_ver 0
|
|
|
46f2fcd |
%global mlir_srcdir llvm-project-%{version}%{?rc_ver:rc%{rc_ver}}
|
|
|
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
|
|
|
46f2fcd |
Source2: https://prereleases.llvm.org/%{version}/hans-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
|
|
|
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 |
|