Add toolchain_clang build support

Signed-off-by: liyunfei <liyunfei33@huawei.com>
This commit is contained in:
liyunfei 2024-07-05 15:55:07 +08:00
parent 30c310c9ea
commit bb2b4f646a

View File

@ -1,5 +1,10 @@
%bcond_without sys_llvm
%bcond_without check
%bcond_without toolchain_clang
%if %{with toolchain_clang}
%global toolchain clang
%endif
%global maj_ver 17
%global min_ver 0
@ -27,7 +32,7 @@
Name: %{pkg_name}
Version: %{mlir_version}
Release: 1
Release: 2
Summary: The MLIR project is a novel approach to building reusable and extensible compiler infrastructure.
License: Apache 2.0
URL: https://mlir.llvm.org/
@ -106,6 +111,10 @@ Requires: python3-numpy
-DBUILD_SHARED_LIBS=OFF \
-DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF \
-DMLIR_BUILD_MLIR_C_DYLIB=ON \
%if "%{toolchain}" == "clang"
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
%endif
%ifarch aarch64 %ix86 ppc64le x86_64
-DLLVM_PARALLEL_LINK_JOBS=1 \
%endif
@ -196,6 +205,9 @@ export PYTHONPATH=%{buildroot}/%{python3_sitearch}
%{python3_sitearch}/mlir/
%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
- Update to 17.0.6