[packages/mold] use %cargo_test

atler atler at pld-linux.org
Sun Nov 29 19:01:22 CET 2026


commit a6277e77c8e541f829c6980146515e0145d33c2e
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Nov 29 19:00:31 2026 +0100

    use %cargo_test

 mold.spec | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/mold.spec b/mold.spec
index 3afe9b7..f555550 100644
--- a/mold.spec
+++ b/mold.spec
@@ -22,7 +22,7 @@ URL:		https://github.com/rui314/mold
 BuildRequires:	cargo
 %{?with_tests:BuildRequires:	glibc-static}
 BuildRequires:	pkgconfig
-BuildRequires:	rpmbuild(macros) >= 2.050
+BuildRequires:	rpmbuild(macros) >= 2.074
 BuildRequires:	rust >= 1.95
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	xz
@@ -64,19 +64,12 @@ EOF
 %build
 export CARGO_HOME="$(pwd)/.cargo-home"
 export MOLD_LIBDIR=%{_libdir}
-export PKG_CONFIG_ALLOW_CROSS=1
 export ZSTD_SYS_USE_PKG_CONFIG=1
 
 %cargo_build --frozen -p mold-cli
 
 %if %{with tests}
-# same flags as %%cargo_build, otherwise cargo rebuilds mold without debuginfo
-CC="%{__cc}" \
-CFLAGS="%{rpmcppflags} %{rpmcflags}" \
-LDFLAGS="%{rpmldflags}" \
-RUSTFLAGS="%{rpmrustflags}" \
-%{__cargo} %{__cargo_common_opts} test --frozen --release \
-	--target %{rust_target} --target-dir %{cargo_targetdir}
+%cargo_test
 %endif
 
 %install
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mold.git/commitdiff/a6277e77c8e541f829c6980146515e0145d33c2e



More information about the pld-cvs-commit mailing list