!6 Add toolchain_clang build support

From: @liyunfei33 
Reviewed-by: @cf-zhao 
Signed-off-by: @cf-zhao
This commit is contained in:
openeuler-ci-bot 2024-07-15 03:30:58 +00:00 committed by Gitee
commit c84aa44c85
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,5 +1,10 @@
%bcond_without sys_llvm %bcond_without sys_llvm
%bcond_without check %bcond_without check
%bcond_without toolchain_clang
%if %{with toolchain_clang}
%global toolchain clang
%endif
%global maj_ver 17 %global maj_ver 17
%global min_ver 0 %global min_ver 0
@ -27,7 +32,7 @@
Name: %{pkg_name} Name: %{pkg_name}
Version: %{mlir_version} Version: %{mlir_version}
Release: 1 Release: 2
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/
@ -106,6 +111,10 @@ Requires: python3-numpy
-DBUILD_SHARED_LIBS=OFF \ -DBUILD_SHARED_LIBS=OFF \
-DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF \ -DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF \
-DMLIR_BUILD_MLIR_C_DYLIB=ON \ -DMLIR_BUILD_MLIR_C_DYLIB=ON \
%if "%{toolchain}" == "clang"
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
%endif
%ifarch aarch64 %ix86 ppc64le x86_64 %ifarch aarch64 %ix86 ppc64le x86_64
-DLLVM_PARALLEL_LINK_JOBS=1 \ -DLLVM_PARALLEL_LINK_JOBS=1 \
%endif %endif
@ -196,6 +205,9 @@ export PYTHONPATH=%{buildroot}/%{python3_sitearch}
%{python3_sitearch}/mlir/ %{python3_sitearch}/mlir/
%changelog %changelog
* Fri Jul 5 2024 liyunfei <liyunfei33@huawei.com> - 17.0.6-2
- Add toolchain_clang build support
* Sun Jun 25 2023 zhoujing <zhoujing106@huawei.com> - 17.0.6-1 * Sun Jun 25 2023 zhoujing <zhoujing106@huawei.com> - 17.0.6-1
- Update to 17.0.6 - Update to 17.0.6