Add toolchain_clang build support
Signed-off-by: liyunfei <liyunfei33@huawei.com>
This commit is contained in:
parent
039493bc97
commit
844c7f9f7e
@ -1,5 +1,10 @@
|
|||||||
%bcond_without sys_llvm
|
%bcond_without sys_llvm
|
||||||
%bcond_without check
|
%bcond_without check
|
||||||
|
%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
|
||||||
@ -27,7 +32,7 @@
|
|||||||
|
|
||||||
Name: %{pkg_name}
|
Name: %{pkg_name}
|
||||||
Version: %{crt_version}
|
Version: %{crt_version}
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: LLVM "compiler-rt" runtime libraries
|
Summary: LLVM "compiler-rt" runtime libraries
|
||||||
|
|
||||||
License: NCSA or MIT
|
License: NCSA or MIT
|
||||||
@ -44,6 +49,9 @@ BuildRequires: ninja-build
|
|||||||
BuildRequires: python3
|
BuildRequires: python3
|
||||||
# We need python3-devel for pathfix.py.
|
# We need python3-devel for pathfix.py.
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
%if %{with toolchain_clang}
|
||||||
|
BuildRequires: clang
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with sys_llvm}
|
%if %{with sys_llvm}
|
||||||
BuildRequires: llvm-devel = %{version}
|
BuildRequires: llvm-devel = %{version}
|
||||||
@ -83,6 +91,10 @@ cd _build
|
|||||||
-DLLVM_LIBDIR_SUFFIX=64 \
|
-DLLVM_LIBDIR_SUFFIX=64 \
|
||||||
%else
|
%else
|
||||||
-DLLVM_LIBDIR_SUFFIX= \
|
-DLLVM_LIBDIR_SUFFIX= \
|
||||||
|
%endif
|
||||||
|
%if "%{toolchain}" == "clang"
|
||||||
|
-DCMAKE_C_COMPILER=clang \
|
||||||
|
-DCMAKE_CXX_COMPILER=clang++ \
|
||||||
%endif
|
%endif
|
||||||
-DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?
|
-DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?
|
||||||
|
|
||||||
@ -109,6 +121,9 @@ cd _build
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 5 2024 liyunfei <liyunfei33@huawei.com> - 17.0.6-4
|
||||||
|
- Add toolchain_clang build support
|
||||||
|
|
||||||
* Wed Apr 03 2024 zhanglimin <zhanglimin@loongson.cn> - 17.0.6-3
|
* Wed Apr 03 2024 zhanglimin <zhanglimin@loongson.cn> - 17.0.6-3
|
||||||
- Improve the support for compiler-rt on LoongArch
|
- Improve the support for compiler-rt on LoongArch
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user