macOS build: Fix 'direct access in function...' warning
For every executable that uses a static Qt library (e.g. rcc using libQt5Bootstrap.a) we got a warning: 'direct access in function...to global weak symbol'. This was because we've built all libraries with -fvisibility=hidden -fvisibility-inlines-hidden but not the executables linking against them. On macOS however, all translation units must have the same visibility setting. We're now setting the same visibilty for libs and executables on darwin. Fixes: QTBUG-81297 Change-Id: I2668e9385caa7f0ce78bf3727b4e5322bc4a294f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
b0c804f345
commit
fcd3a20059
@ -23,7 +23,6 @@ qtConfig(c11): CONFIG += c11
|
||||
qtConfig(stack-protector-strong): CONFIG += stack_protector_strong
|
||||
contains(TEMPLATE, .*lib) {
|
||||
# module and plugins
|
||||
if(!host_build|!cross_compile):qtConfig(reduce_exports): CONFIG += hide_symbols
|
||||
unix:qtConfig(reduce_relocations): CONFIG += bsymbolic_functions
|
||||
qtConfig(separate_debug_info): CONFIG += separate_debug_info
|
||||
|
||||
@ -58,6 +57,9 @@ contains(TEMPLATE, .*lib) {
|
||||
QMAKE_PRL_INSTALL_REPLACE += qtlibdir_replace
|
||||
}
|
||||
}
|
||||
contains(TEMPLATE, .*lib)|darwin {
|
||||
if(!host_build|!cross_compile):qtConfig(reduce_exports): CONFIG += hide_symbols
|
||||
}
|
||||
|
||||
# The remainder of this file must not apply to host tools/libraries,
|
||||
# as the host compiler's version and capabilities are not checked.
|
||||
|
Loading…
Reference in New Issue
Block a user