commit:     a54b99403c7ca79ae863517679255818e7621779
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 11 19:59:18 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Nov 11 20:31:37 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a54b9940

sys-devel/llvm: Disable test targets w/ USE=-test

Pass LLVM_INCLUDE_TESTS explicitly to disable test targets entirely
when USE=-test is used.  This avoids requiring third-party directory
when tests are not being run.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-devel/llvm/llvm-16.0.0.9999.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys-devel/llvm/llvm-16.0.0.9999.ebuild 
b/sys-devel/llvm/llvm-16.0.0.9999.ebuild
index 6d002766d626..ce7bb47d6446 100644
--- a/sys-devel/llvm/llvm-16.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-16.0.0.9999.ebuild
@@ -68,7 +68,8 @@ PDEPEND="
        binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
 "
 
-LLVM_COMPONENTS=( llvm cmake third-party )
+LLVM_COMPONENTS=( llvm cmake )
+LLVM_TEST_COMPONENTS=( third-party )
 LLVM_MANPAGES=1
 LLVM_USE_TARGETS=provide
 llvm.org_set_globals
@@ -347,6 +348,8 @@ multilib_src_configure() {
                # is that the former list is explicitly verified at cmake time
                -DLLVM_TARGETS_TO_BUILD=""
                -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
+               -DLLVM_INCLUDE_BENCHMARKS=OFF
+               -DLLVM_INCLUDE_TESTS=$(usex test)
                -DLLVM_BUILD_TESTS=$(usex test)
 
                -DLLVM_ENABLE_FFI=$(usex libffi)

Reply via email to