]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Makefile: Do not install the container testroot if not running tests
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 10 Jun 2026 21:25:56 +0000 (18:25 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 3 Jul 2026 15:48:32 +0000 (12:48 -0300)
Every subdirectory tests target depends on
$(objpfx)testroot.pristine/install.stamp, whose recipe performs a full
DESTDIR installation (about 12s and 154MB on x86_64).  The testroot is
only consumed by the container tests, which do not run when
run-built-tests is no, so skip it entirely in that case.

This saves about 10s on x86_64 [1] and 30s on aarch64 [2].

[1] Ryzen 5900x, 12c/24t, gcc 16.1.1, binutils 2.26, and GNU make 4.3
[2] N1, 80c, gcc 15.1.1, binutils 2.25, GNU make 4.3

Reviewed-by: Sam James <sam@gentoo.org>
Makefile

index 7d46e8387d62f1c2015ab15cc00b4a3017922689..23f3c1895db19464ca7c4c2fb41884e39440f710 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -792,8 +792,13 @@ else
 LINKS_DSO_PROGRAM = links-dso-program
 endif
 
+# The testroot is only used by the container tests, which are not run
+# when run-built-tests is no; skip the installation entirely in that
+# case.
+ifeq ($(run-built-tests),yes)
 $(tests-container) $(addsuffix /tests,$(subdirs)) : \
                $(objpfx)testroot.pristine/install.stamp
+endif
 $(objpfx)testroot.pristine/install.stamp :
        test -d $(objpfx)testroot.pristine || \
          mkdir $(objpfx)testroot.pristine