Skip to content

Commit 24dffdd

Browse files
committed
Merge bitcoin/bitcoin#29072: build: use -no_exported_symbols on macOS
81d4dc8 build: use -no_exported_symbols on macOS (fanquake) Pull request description: This reduces the size of the binary by ~1% when building with `--enable-reduce-exports`. > -no_exported_symbols > Useful for main executable that don't have plugins and thus need no symbol exports. Can be tested with `dyld_info -exports src/bitcoind`. The only exported symbol should be `__mh_execute_header`. ACKs for top commit: theuni: utACK 81d4dc8 hebasto: ACK 81d4dc8. Tree-SHA512: ae46065a05d190753ba807943c0734a06cfe6d2cf9eaf3c3aa93250bf8639da8bc53b81c6b0390e6d572a74c6bb31a695f8c5924810bfa358a3c9b08caff03f7
2 parents 4687832 + 81d4dc8 commit 24dffdd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,7 @@ if test "$use_reduce_exports" = "yes"; then
13171317
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fvisibility=hidden"],
13181318
[AC_MSG_ERROR([Cannot set hidden symbol visibility. Use --disable-reduce-exports.])], [$CXXFLAG_WERROR])
13191319
AX_CHECK_LINK_FLAG([-Wl,--exclude-libs,ALL], [RELDFLAGS="-Wl,--exclude-libs,ALL"], [], [$LDFLAG_WERROR])
1320+
AX_CHECK_LINK_FLAG([-Wl,-no_exported_symbols], [LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -Wl,-no_exported_symbols"], [], [$LDFLAG_WERROR])
13201321
fi
13211322

13221323
if test "$use_tests" = "yes"; then

0 commit comments

Comments
 (0)