adopt to new cmake macro

This commit is contained in:
Funda Wang 2024-11-11 00:03:19 +08:00
parent 019e503605
commit af9fe74737
2 changed files with 13 additions and 6 deletions

View File

@ -33,9 +33,9 @@
Name: %{pkg_name}
Version: %{mlir_version}
Release: 3
Release: 4
Summary: The MLIR project is a novel approach to building reusable and extensible compiler infrastructure.
License: Apache 2.0
License: Apache-2.0
URL: https://mlir.llvm.org/
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{mlir_version}/%{mlir_srcdir}.tar.xz
@ -138,10 +138,10 @@ Requires: python3-numpy
-DLLVM_TARGETS_TO_BUILD="AArch64"
%endif
%ninja_build
%cmake_build
%install
%ninja_install
%cmake_install
mkdir -p %{buildroot}/%{python3_sitearch}
mv %{buildroot}/usr/python_packages/mlir_core/mlir %{buildroot}/%{python3_sitearch}
@ -150,8 +150,8 @@ rmdir %{buildroot}/usr/python_packages/mlir_core %{buildroot}/usr/python_package
# Unneeded files.
rm -rf %{buildroot}/usr/src/python
%check
%if %{with check}
%check
# TODO: Investigate the following issues.
rm -rf test/mlir-pdll-lsp-server/compilation_database.test
rm -rf test/mlir-pdll-lsp-server/completion.test
@ -179,7 +179,7 @@ rm -rf test/tblgen-lsp-server/hover.test
# build process .exe tools normally use rpath or static linkage
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:%{buildroot}/%{python3_sitearch}/mlir/_mlir_libs
export PYTHONPATH=%{buildroot}/%{python3_sitearch}
%ninja_build check-mlir
%cmake_build --target check-mlir
%endif
%files
@ -209,6 +209,9 @@ export PYTHONPATH=%{buildroot}/%{python3_sitearch}
%{python3_sitearch}/mlir/
%changelog
* Mon Nov 11 2024 Funda Wang <fundawang@yeah.net> - 17.0.6-4
- adopt to new cmake macro
* Tue Aug 20 2024 liyunfei <liyunfei33@huawei.com> - 17.0.6-3
- Add BiSheng Autotuner support.

4
llvm-mlir.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: llvm/llvm-project
tag_prefix: ^llvmorg-
separator: .