build: pass -dead_strip_dylibs to ld on macOS
Summary:
` This strips some unused dylibs from bitcoin-qt. 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.
Backport of core PR17676.
Only the commit ba0cad2
(https://github.com/bitcoin/bitcoin/pull/17676/commits/ba0cad2702e01860d3539f170343d8d9f9c5b75a)
is backported as the other is already covered by D3034.
Test Plan: Build for OSX and run bitcoin-qt.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5666