commit: 7f6e54eb0a74dd2f273cbc1378d61fac8e675efa
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 16 09:36:14 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb 16 09:37:25 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f6e54eb
sys-devel/mold: conditionally build tests
Not that it makes much difference here as it only affects a single
extra target for a symlink, but that could change in future.
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-devel/mold/mold-2.36.0.ebuild | 12 ++++++++++--
sys-devel/mold/mold-9999.ebuild | 14 +++++++++++---
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/sys-devel/mold/mold-2.36.0.ebuild
b/sys-devel/mold/mold-2.36.0.ebuild
index a58b5bfabc3f..1a42a8a55e22 100644
--- a/sys-devel/mold/mold-2.36.0.ebuild
+++ b/sys-devel/mold/mold-2.36.0.ebuild
@@ -21,7 +21,8 @@ fi
# - siphash ( MIT CC0-1.0 )
LICENSE="MIT BSD-2 CC0-1.0"
SLOT="0"
-IUSE="debug"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
RDEPEND="
app-arch/zstd:=
@@ -70,12 +71,19 @@ src_configure() {
use debug || append-cppflags "-DNDEBUG"
local mycmakeargs=(
- -DMOLD_ENABLE_QEMU_TESTS=OFF
+ -DBUILD_TESTING=$(usex test)
-DMOLD_LTO=OFF # Should be up to the user to decide this with
CXXFLAGS.
-DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin)
-DMOLD_USE_SYSTEM_MIMALLOC=ON
-DMOLD_USE_SYSTEM_TBB=ON
)
+
+ if ! use test ; then
+ mycmakeargs+=(
+ -DMOLD_ENABLE_QEMU_TESTS=OFF
+ )
+ fi
+
cmake_src_configure
}
diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild
index e0398e86fe4b..1a42a8a55e22 100644
--- a/sys-devel/mold/mold-9999.ebuild
+++ b/sys-devel/mold/mold-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2021-2024 Gentoo Authors
+# Copyright 2021-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -21,7 +21,8 @@ fi
# - siphash ( MIT CC0-1.0 )
LICENSE="MIT BSD-2 CC0-1.0"
SLOT="0"
-IUSE="debug"
+IUSE="debug test"
+RESTRICT="!test? ( test )"
RDEPEND="
app-arch/zstd:=
@@ -70,12 +71,19 @@ src_configure() {
use debug || append-cppflags "-DNDEBUG"
local mycmakeargs=(
- -DMOLD_ENABLE_QEMU_TESTS=OFF
+ -DBUILD_TESTING=$(usex test)
-DMOLD_LTO=OFF # Should be up to the user to decide this with
CXXFLAGS.
-DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin)
-DMOLD_USE_SYSTEM_MIMALLOC=ON
-DMOLD_USE_SYSTEM_TBB=ON
)
+
+ if ! use test ; then
+ mycmakeargs+=(
+ -DMOLD_ENABLE_QEMU_TESTS=OFF
+ )
+ fi
+
cmake_src_configure
}