!11 adopt to new cmake macro

From: @fundawang 
Reviewed-by: @liyunfei33 
Signed-off-by: @liyunfei33
This commit is contained in:
openeuler-ci-bot 2024-11-12 12:51:15 +00:00 committed by Gitee
commit 8f4c48bf2f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 13 additions and 6 deletions

View File

@ -33,9 +33,9 @@
Name: %{pkg_name} Name: %{pkg_name}
Version: %{mlir_version} Version: %{mlir_version}
Release: 3 Release: 4
Summary: The MLIR project is a novel approach to building reusable and extensible compiler infrastructure. 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/ URL: https://mlir.llvm.org/
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{mlir_version}/%{mlir_srcdir}.tar.xz 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" -DLLVM_TARGETS_TO_BUILD="AArch64"
%endif %endif
%ninja_build %cmake_build
%install %install
%ninja_install %cmake_install
mkdir -p %{buildroot}/%{python3_sitearch} mkdir -p %{buildroot}/%{python3_sitearch}
mv %{buildroot}/usr/python_packages/mlir_core/mlir %{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. # Unneeded files.
rm -rf %{buildroot}/usr/src/python rm -rf %{buildroot}/usr/src/python
%check
%if %{with check} %if %{with check}
%check
# TODO: Investigate the following issues. # TODO: Investigate the following issues.
rm -rf test/mlir-pdll-lsp-server/compilation_database.test rm -rf test/mlir-pdll-lsp-server/compilation_database.test
rm -rf test/mlir-pdll-lsp-server/completion.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 # build process .exe tools normally use rpath or static linkage
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:%{buildroot}/%{python3_sitearch}/mlir/_mlir_libs export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:%{buildroot}/%{python3_sitearch}/mlir/_mlir_libs
export PYTHONPATH=%{buildroot}/%{python3_sitearch} export PYTHONPATH=%{buildroot}/%{python3_sitearch}
%ninja_build check-mlir %cmake_build --target check-mlir
%endif %endif
%files %files
@ -209,6 +209,9 @@ export PYTHONPATH=%{buildroot}/%{python3_sitearch}
%{python3_sitearch}/mlir/ %{python3_sitearch}/mlir/
%changelog %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 * Tue Aug 20 2024 liyunfei <liyunfei33@huawei.com> - 17.0.6-3
- Add BiSheng Autotuner support. - 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: .