On master (a213bd63ca0c96e8c98e84ec916f83c4ba28d486) when building bitcoin-qt
with depends for macOS, clang spams with a load of warnings like this one:
0ld: warning: direct access in function 'QMetaTypeIdQObject<QWindow*, 8>::qt_metatype_id()' from file '/Users/hebasto/bitcoin/depends/aarch64-apple-darwin21.1.0/plugins/platforms/libqcocoa.a(qcocoaintegration.o)' to global weak symbol 'QtMetaTypePrivate::QMetaTypeFunctionHelper<QWindow*, true>::Construct(void*, void const*)' from file 'qt/libbitcoinqt.a(libbitcoinqt_a-walletcontroller.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
The cause of such warnings is the fact that -fvisibility=hidden
is used during building of the qt
package by default, but not for all of other building stages. That is fixed in this PR.