aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2019-12-06 09:11:08 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2019-12-06 09:11:14 +0100
commitc7c9c44278471228376ee29f2852dcfc6b58cb93 (patch)
tree4e782662ffded06d2d44704c0211ad74799901fe
parentcf43f3f0a8ffb9006c799004a441776c299174f4 (diff)
parentbd44711e1bb2eee7646f2f8e2e8763d1c216bdb9 (diff)
Merge #17663: build: pass -dead_strip_dylibs to ld on macOS
bd44711e1bb2eee7646f2f8e2e8763d1c216bdb9 build: pass -dead_strip_dylibs to ld on macOS (fanquake) Pull request description: This strips some unused dylibs from bitcoin-qt. ```diff otool -L src/qt/bitcoin-qt /usr/lib/libSystem.B.dylib - /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation -/System/Library/Frameworks/Security.framework/Versions/A/Security /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL -/System/Library/Frameworks/AGL.framework/Versions/A/AGL /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon /usr/lib/libc++.1.dylib /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO /usr/lib/libobjc.A.dylib ``` `AGL` - ObjC wrapper for OpenGL. `DiskArbitration` - mount/unmount notifications and events. `Security` - low level security operations, authentication services. From `man ld`: ``` Remove dylibs that are unreachable by the entry point or exported symbols. That is, suppresses the generation of load command commands for dylibs which supplied no symbols during the link. This option should not be used when linking against a dylib which is required at runtime for some indirect reason such as the dylib has an important initializer. ``` ACKs for top commit: theuni: ACK bd44711e1bb2eee7646f2f8e2e8763d1c216bdb9. Tree-SHA512: 9592ce2966d28cb6c58e01efd401f56a4baa5dc5be5313f4fe8454632b578608be65a23c8602772049cd4655a9cb020fdd40d6622a244c301920d8c3db43f99a
-rw-r--r--configure.ac1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ed9ccade6d..e0bec0882e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -783,6 +783,7 @@ fi
dnl this flag screws up non-darwin gcc even when the check fails. special-case it.
if test x$TARGET_OS = xdarwin; then
AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])
+ AX_CHECK_LINK_FLAG([[-Wl,-dead_strip_dylibs]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"])
fi
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h sys/sysctl.h vm/vm_param.h sys/vmmeter.h sys/resources.h])