adopt to new cmake macro

This commit is contained in:
Funda Wang 2024-11-11 09:24:31 +08:00
parent ddc937a977
commit 3e2755936b
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,5 @@
%undefine __cmake_in_source_build
%bcond_without sys_llvm
%bcond_without check
%bcond_with toolchain_clang
@ -38,7 +40,7 @@
Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: 6
Release: 7
Summary: The LLVM Linker
License: NCSA
@ -98,9 +100,7 @@ Shared libraries for LLD.
%autosetup -n lld-%{version}.src -p2
%build
mkdir -p _build
cd _build
%cmake .. -G Ninja \
%cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
@ -121,16 +121,16 @@ cd _build
%endif
-DLLVM_MAIN_SRC_DIR=%{install_prefix}/src
%ninja_build
%cmake_build
%install
%ninja_install -C _build
%cmake_install
rm %{buildroot}%{install_includedir}/mach-o/compact_unwind_encoding.h
%check
%if %{with check}
%ninja_build check-lld -C _build
%ctest
%endif
%files
@ -146,6 +146,9 @@ rm %{buildroot}%{install_includedir}/mach-o/compact_unwind_encoding.h
%{install_libdir}/liblld*.so.*
%changelog
* Mon Nov 11 2024 Funda Wang <fundawang@yeah.net> - 17.0.6-7
- adopt to new cmake macro
* Mon Sep 23 2024 zhanglimin <zhanglimin@loongson.cn> - 17.0.6-6
- [LoongArch] Backport the support for call36 and extreme model relocs.

4
lld.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: llvm/llvm-project
tag_prefix: ^llvmorg-
separator: .