CMake: Increase static library link multiplicity for VxWorks to 3
It appears that the VxWorks linker behaves similarly to GNU ld, where the order of link libraries on the command line matters. Our plugin linking system is not ideal (due cycles like Gui -> plugin -> Gui, or Qml -> qml plugin -> Qml), and can change the order of the linked libraries on the command line. Due to that, some of the qtdeclarative tests fail to link with undefined symbols in Qml. Apply the same workaround we did for Linux, which is to increase the LINK_INTERFACE_MULTIPLICITY of Qt modules to 3, effectively ensuring that each qt module static library appears at least 3 times on the link line, given the linker more chances to find relevant symbols. Amends 58a7e4f0bc5e9290cc205762d51adc5806b034fd More in detail reasoning explained in commit message of 69b27e09f55e63a713ca8b14f162d4f449c8dfff in qtquick3d Fixes: QTBUG-129113 Task-number: QTBUG-83498 Change-Id: I7ac5665d4dd2865584ba1c96d51fd311ef224d10 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 8c49dc9bfc388f7a850d33201f0165949481a18f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
ed793b94db
commit
07ba8781f7
@ -362,7 +362,7 @@ function(qt_internal_add_module target)
|
|||||||
qt_set_target_info_properties(${target} ${ARGN})
|
qt_set_target_info_properties(${target} ${ARGN})
|
||||||
qt_handle_multi_config_output_dirs("${target}")
|
qt_handle_multi_config_output_dirs("${target}")
|
||||||
|
|
||||||
if(NOT BUILD_SHARED_LIBS AND LINUX)
|
if(NOT BUILD_SHARED_LIBS AND (LINUX OR VXWORKS))
|
||||||
# Horrible workaround for static build failures due to incorrect static library link
|
# Horrible workaround for static build failures due to incorrect static library link
|
||||||
# order. By increasing the multiplicity to 3, each library cycle will be repeated
|
# order. By increasing the multiplicity to 3, each library cycle will be repeated
|
||||||
# 3 times on the link line, reducing the probability of undefined symbols at
|
# 3 times on the link line, reducing the probability of undefined symbols at
|
||||||
|
Loading…
x
Reference in New Issue
Block a user