Add toolchain_clang build support
Signed-off-by: liyunfei <liyunfei33@huawei.com>
This commit is contained in:
parent
c9a0f5308a
commit
02ab7ced7e
17
llvm.spec
17
llvm.spec
@ -1,6 +1,11 @@
|
|||||||
%bcond_without sys_llvm
|
%bcond_without sys_llvm
|
||||||
%bcond_without check
|
%bcond_without check
|
||||||
%bcond_with classic_flang
|
%bcond_with classic_flang
|
||||||
|
%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
|
||||||
@ -38,7 +43,7 @@
|
|||||||
|
|
||||||
Name: %{pkg_name}
|
Name: %{pkg_name}
|
||||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||||
Release: 10
|
Release: 11
|
||||||
Summary: The Low Level Virtual Machine
|
Summary: The Low Level Virtual Machine
|
||||||
|
|
||||||
License: NCSA
|
License: NCSA
|
||||||
@ -85,6 +90,9 @@ BuildRequires: python3-recommonmark
|
|||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
%if %{with toolchain_clang}
|
||||||
|
BuildRequires: clang
|
||||||
|
%endif
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
@ -230,6 +238,10 @@ cd _build
|
|||||||
%endif
|
%endif
|
||||||
%if %{with classic_flang}
|
%if %{with classic_flang}
|
||||||
-DLLVM_ENABLE_CLASSIC_FLANG=ON \
|
-DLLVM_ENABLE_CLASSIC_FLANG=ON \
|
||||||
|
%endif
|
||||||
|
%if "%{toolchain}" == "clang"
|
||||||
|
-DCMAKE_C_COMPILER=clang \
|
||||||
|
-DCMAKE_CXX_COMPILER=clang++ \
|
||||||
%endif
|
%endif
|
||||||
-DLLVM_INCLUDE_BENCHMARKS=OFF
|
-DLLVM_INCLUDE_BENCHMARKS=OFF
|
||||||
%ninja_build LLVM
|
%ninja_build LLVM
|
||||||
@ -353,6 +365,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build
|
|||||||
%{install_includedir}/llvm-gmock
|
%{install_includedir}/llvm-gmock
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 5 2024 liyunfei <liyunfei33@huawei.com> - 17.0.6-11
|
||||||
|
- Add toolchain_clang build support
|
||||||
|
|
||||||
* Mon Apr 29 2024 wangqiang <wangqiang1@kylinos.cn> - 17.0.6-10
|
* Mon Apr 29 2024 wangqiang <wangqiang1@kylinos.cn> - 17.0.6-10
|
||||||
- Update llvm-lit config to support macro `build_for_openeuler`
|
- Update llvm-lit config to support macro `build_for_openeuler`
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user