From aa3595e053e255609b45adae29c7aae7bc633c34 Mon Sep 17 00:00:00 2001 From: liyunfei Date: Thu, 11 Jul 2024 15:57:27 +0800 Subject: [PATCH] Add toolchain_clang build support Signed-off-by: liyunfei --- libclc.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/libclc.spec b/libclc.spec index 88c020a..6e998eb 100644 --- a/libclc.spec +++ b/libclc.spec @@ -1,5 +1,10 @@ %bcond_without check %bcond_without sys_llvm +%bcond_without toolchain_clang + +%if %{with toolchain_clang} +%global toolchain clang +%endif %global maj_ver 17 %global min_ver 0 @@ -25,7 +30,7 @@ Name: %{pkg_name} Version: %{clc_version} -Release: 2 +Release: 3 Summary: An implementation of the library requirements of the OpenCL C License: Apache-2.0 WITH LLVM-exception OR BSD OR MIT URL: https://libclc.llvm.org @@ -85,7 +90,12 @@ developing applications that use libclc. %build export CFLAGS="%{build_cflags} -D__extern_always_inline=inline" %set_build_flags -%cmake -DCMAKE_INSTALL_DATADIR:PATH=%{install_libdir} +%cmake \ +%if "%toolchain" == "clang" + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ +%endif +-DCMAKE_INSTALL_DATADIR:PATH=%{install_libdir} %make_build @@ -113,6 +123,9 @@ make test || true %{install_includedir}/clc %changelog +* Fri Jul 5 2024 liyunfei - 17.0.6-3 +- Add toolchain_clang build support + * Thu Mar 14 2024 yinxiulin - 17.0.6-2 - Add ppc64le support -- Gitee