mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-05 21:21:17 +00:00
Merge bitcoin/bitcoin#29072: build: use -no_exported_symbols on macOS
81d4dc8e8739df0e9a8e92f55071733f6500617b 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 81d4dc8e8739df0e9a8e92f55071733f6500617b
hebasto:
ACK 81d4dc8e8739df0e9a8e92f55071733f6500617b.
Tree-SHA512: ae46065a05d190753ba807943c0734a06cfe6d2cf9eaf3c3aa93250bf8639da8bc53b81c6b0390e6d572a74c6bb31a695f8c5924810bfa358a3c9b08caff03f7
This commit is contained in:
commit
24dffdde7b
@ -1317,6 +1317,7 @@ if test "$use_reduce_exports" = "yes"; then
|
||||
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fvisibility=hidden"],
|
||||
[AC_MSG_ERROR([Cannot set hidden symbol visibility. Use --disable-reduce-exports.])], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_LINK_FLAG([-Wl,--exclude-libs,ALL], [RELDFLAGS="-Wl,--exclude-libs,ALL"], [], [$LDFLAG_WERROR])
|
||||
AX_CHECK_LINK_FLAG([-Wl,-no_exported_symbols], [LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -Wl,-no_exported_symbols"], [], [$LDFLAG_WERROR])
|
||||
fi
|
||||
|
||||
if test "$use_tests" = "yes"; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user