On master (d1e42659bbdd8da170542d8c638242cd94f71a7d):
0$ ./autogen.sh && ./configure --without-gui --disable-wallet && make clean
1$ make 2>&1 | grep LD | grep -v .la
2 CXXLD bitcoind
3 CXXLD bitcoin-cli
4 CXXLD bitcoin-tx
5 CXXLD bitcoin-util
6 CXXLD test/test_bitcoin
7 CXXLD bench/bench_bitcoin
8 CXXLD minisketch/test
9 CXXLD test/fuzz/fuzz
10 CXXLD univalue/test/object
11 CXXLD univalue/test/unitester
12$ make check 2>&1 | grep LD
13 CCLD exhaustive_tests
14 CCLD tests
With this PR:
0$ ./autogen.sh && ./configure --without-gui --disable-wallet && make clean
1$ make 2>&1 | grep LD | grep -v .la
2 CXXLD bitcoind
3 CXXLD bitcoin-cli
4 CXXLD bitcoin-tx
5 CXXLD bitcoin-util
6 CXXLD test/test_bitcoin
7 CXXLD bench/bench_bitcoin
8 CXXLD test/fuzz/fuzz
9 CXXLD univalue/test/object
10 CXXLD univalue/test/unitester
11$ make check 2>&1 | grep LD
12 CXXLD minisketch/test
13 CCLD exhaustive_tests
14 CCLD tests
In fact, this PR restores behavior that was before bitcoin/bitcoin#22646, and that behavior looks more optimal.
As an outcome, the contrib/guix/libexec/build.sh
does not spend resources to build binaries which are not a part of the release package.