Add toolchain_clang build support
Signed-off-by: liyunfei <liyunfei33@huawei.com>
This commit is contained in:
parent
35172ed815
commit
a442bc3e3f
14
lld.spec
14
lld.spec
@ -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
|
||||||
@ -32,7 +37,7 @@
|
|||||||
|
|
||||||
Name: %{pkg_name}
|
Name: %{pkg_name}
|
||||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: The LLVM Linker
|
Summary: The LLVM Linker
|
||||||
|
|
||||||
License: NCSA
|
License: NCSA
|
||||||
@ -104,6 +109,10 @@ cd _build
|
|||||||
-DLLVM_LIT_ARGS="-sv \
|
-DLLVM_LIT_ARGS="-sv \
|
||||||
--path %{install_prefix}" \
|
--path %{install_prefix}" \
|
||||||
-DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \
|
-DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \
|
||||||
|
%if "%{toolchain}" == "clang"
|
||||||
|
-DCMAKE_C_COMPILER=clang \
|
||||||
|
-DCMAKE_CXX_COMPILER=clang++ \
|
||||||
|
%endif
|
||||||
-DLLVM_MAIN_SRC_DIR=%{install_prefix}/src
|
-DLLVM_MAIN_SRC_DIR=%{install_prefix}/src
|
||||||
|
|
||||||
%ninja_build
|
%ninja_build
|
||||||
@ -131,6 +140,9 @@ rm %{buildroot}%{install_includedir}/mach-o/compact_unwind_encoding.h
|
|||||||
%{install_libdir}/liblld*.so.*
|
%{install_libdir}/liblld*.so.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jul 5 2024 liyunfei <liyunfei33@huawei.com> - 17.0.6-3
|
||||||
|
- Add toolchain_clang build support
|
||||||
|
|
||||||
* Mon Mar 25 2024 zhanglimin <zhanglimin@loongson.cn> - 17.0.6-2
|
* Mon Mar 25 2024 zhanglimin <zhanglimin@loongson.cn> - 17.0.6-2
|
||||||
- Supoort `relax` feature on LoongArch
|
- Supoort `relax` feature on LoongArch
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user