Add support for riscv64

Tests are allowed to fail to gather information about failing ones.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2024-10-14 13:55:09 +03:00
parent bfcabf0eac
commit 0be293ffd3
Signed by: davidlt
GPG Key ID: 7A5F42FAF91FACC3

View File

@ -12,7 +12,7 @@
Name: mlir
Version: %{mlir_version}%{?rc_ver:~rc%{rc_ver}}
Release: 1%{?dist}
Release: 1.0.riscv64%{?dist}
Summary: Multi-Level Intermediate Representation Overview
License: Apache-2.0 WITH LLVM-exception
@ -122,7 +122,7 @@ Requires: python3-numpy
%build
%ifarch %ix86
%ifarch %ix86 riscv64
%global debug_package %{nil}
%global _lto_cflags %{nil}
%endif
@ -134,6 +134,10 @@ Requires: python3-numpy
%global _dwz_low_mem_die_limit_aarch64 1
%global _dwz_max_die_limit_aarch64 1000000
# riscv64 builders are slow and don't have a lot of RAM
%global _dwz_low_mem_die_limit_riscv64 1
%global _dwz_max_die_limit_riscv64 1000000
# On s390x, dwz consumes too much RAM. Restrict its resources in
# order to stop dwz early. We prefer to miss the DWARF optimization than not
# not being able to build this package on aarch64.
@ -159,7 +163,7 @@ Requires: python3-numpy
-DBUILD_SHARED_LIBS=OFF \
-DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF \
-DMLIR_BUILD_MLIR_C_DYLIB=ON \
%ifarch aarch64 %ix86 ppc64le x86_64
%ifarch aarch64 %ix86 ppc64le x86_64 riscv64
-DLLVM_PARALLEL_LINK_JOBS=1 \
%endif
%ifarch %ix86
@ -243,7 +247,11 @@ rm -rf test/mlir-pdll-lsp-server/view-output.test
# Test execution normally relies on RPATH, so set LD_LIBRARY_PATH instead.
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:%{buildroot}/%{python3_sitearch}/mlir/_mlir_libs
export PYTHONPATH=%{buildroot}/%{python3_sitearch}
%ifarch riscv64
%cmake_build --target check-mlir || true
%else
%cmake_build --target check-mlir
%endif
%files
%license LICENSE.TXT
@ -286,6 +294,9 @@ export PYTHONPATH=%{buildroot}/%{python3_sitearch}
%{python3_sitearch}/mlir/
%changelog
* Mon Oct 14 2024 David Abdurachmanov <davidlt@rivosinc.com> - 19.1.0-1.0.riscv64
- Add support for riscv64
* Thu Sep 19 2024 Timm Bäder <tbaeder@redhat.com> - 19.1.0-1
- Update to 19.1.0