From bb2b4f646a4962b653a2a37bacca9419e93393ab Mon Sep 17 00:00:00 2001 From: liyunfei Date: Fri, 5 Jul 2024 15:55:07 +0800 Subject: [PATCH] Add toolchain_clang build support Signed-off-by: liyunfei --- llvm-mlir.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/llvm-mlir.spec b/llvm-mlir.spec index c82284c..475b845 100644 --- a/llvm-mlir.spec +++ b/llvm-mlir.spec @@ -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 - 17.0.6-2 +- Add toolchain_clang build support + * Sun Jun 25 2023 zhoujing - 17.0.6-1 - Update to 17.0.6 -- Gitee