diff --git a/clang.spec b/clang.spec index 45f09c4327d5fdc863ae71678f07ee3d71010825..95cce73e0e48ec916d4c6b7cdc2c6cdc209ec68e 100644 --- a/clang.spec +++ b/clang.spec @@ -1,6 +1,11 @@ %bcond_without sys_llvm %bcond_without check %bcond_with classic_flang +%bcond_without toolchain_clang + +%if %{with toolchain_clang} +%global toolchain clang +%endif %global maj_ver 17 %global min_ver 0 @@ -37,7 +42,7 @@ Name: %{pkg_name} Version: %{clang_version} -Release: 17 +Release: 18 Summary: A C language family front-end for LLVM License: NCSA @@ -108,6 +113,9 @@ BuildRequires: perl(lib) BuildRequires: perl(Term::ANSIColor) BuildRequires: perl(Text::ParseWords) BuildRequires: perl(Sys::Hostname) +%if %{with toolchain_clang} +BuildRequires: clang +%endif Requires: %{name}-libs%{?_isa} = %{version}-%{release} @@ -269,6 +277,10 @@ cd _build -DLLVM_ENABLE_CLASSIC_FLANG=ON \ %endif -DBUILD_FOR_OPENEULER=ON \ +%if "%{toolchain}" == "clang" + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ +%endif -DCLANG_DEFAULT_UNWINDLIB=libgcc %ninja_build @@ -395,6 +407,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build %{install_bindir}/git-clang-format %changelog +* Fri Jul 5 2024 liyunfei - 17.0.6-18 +- Add toolchain_clang build support + * Tue Jun 04 2024 Zhao Mengmeng - 17.0.6-17 - Fix the too-early instantiation of conditional "explict" by applying the patch of https://github.com/llvm/llvm-project/commit/128b3b61fe6768c724975fd1df2be0abec848cf6