summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobject.cpp
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-06-11 12:44:10 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-06-11 19:38:09 +0200
commit58a7e4f0bc5e9290cc205762d51adc5806b034fd (patch)
treef61d3bceeefe2b0ed5f714d32de0518bb7b03ec3 /src/corelib/kernel/qmetaobject.cpp
parentb3e0732740d8fdace82d91973dac87261402604f (diff)
CMake: Implement workaround for failing linux static builds
In static builds, due to our CMake design for auto-linking plugins being incorrect we sometimes cause link failures on Linux in leaf modules, because the link line order is incorrect. So far such failures were fixed by explicitly modifying the order of libraries on the link line in each failing CMake project. This proves to be problematic because the failures appear in seemingly random integrations that don't even touch the build system parts. Until we fix the design, another less performant but more general / safe way is to increase the link interface multiplicity, which causes a cycle of libraries to be repeated more than 2 times on the link line, thus giving the ld linker more chances to figure out which symbols are needed for linking. Implement this for Linux static builds to avoid random integration failures for people that know nothing about this issue. The link multiplicity for all qt modules is increased to 3, thus QtGui would be repeated 3 times on the link line of each dependent library. The value is also configurable via the QT_LINK_CYCLE_MULTIPLICITY cache variable. Task-number: QTBUG-83498 Change-Id: I2fd2bb2b5e7fec4e3ef5d1194668b524d20f7067 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetaobject.cpp')
0 files changed, 0 insertions, 0 deletions