diff options
author | merge-script <fanquake@gmail.com> | 2024-07-16 15:49:12 +0100 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-07-16 15:49:12 +0100 |
commit | 24dffdde7b40f9032fa62dd19928d38329471a94 (patch) | |
tree | 4a1262ccfe99799a1bdf26b6b221f5cfbebefd02 /configure.ac | |
parent | 46878326808f643f08ec3f69dcec5c8fafeb7b59 (diff) | |
parent | 81d4dc8e8739df0e9a8e92f55071733f6500617b (diff) |
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
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index af0d1d1505..d5d08f5c63 100644 --- a/configure.ac +++ b/configure.ac @@ -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 |