From 0be293ffd3003ddd38853ffa04dab64b61ce0cf7 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Mon, 14 Oct 2024 13:55:09 +0300 Subject: [PATCH] Add support for riscv64 Tests are allowed to fail to gather information about failing ones. Signed-off-by: David Abdurachmanov --- mlir.spec | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/mlir.spec b/mlir.spec index 1949036..da6ca5d 100644 --- a/mlir.spec +++ b/mlir.spec @@ -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 - 19.1.0-1.0.riscv64 +- Add support for riscv64 + * Thu Sep 19 2024 Timm Bäder - 19.1.0-1 - Update to 19.1.0