qt5base-lts/qmake
Joerg Bornemann 1d3b190425 qmake: Fix overlong command lines for static Qt builds on Windows
Linker response files for the MinGW and Unix makefile generators are
controlled by the variable QMAKE_LINK_OBJECT_MAX.  This variable holds a
number.  If the number of object files passed to the linker exceeds this
number, a linker response file containing object file paths is created.

This heuristic is extremely imprecise.  It doesn't take into account the
length of object file names nor the length of $$OBJECTS_DIR.

Also, when using a static Qt, a big part of the linker command line are
libraries.  A relatively small example can fail to link with "The
command line is too long" on Windows, even with the object files being
in a response file.

The MinGW makefile generator already reads the variable
QMAKE_RESPONSEFILE_THRESHOLD for compiler response files.  Re-use this
variable for the linker response file of the Unix and MinGW makefile
generators.

If QMAKE_RESPONSEFILE_THRESHOLD is set, use it to determine whether to
create a response file.  QMAKE_LINK_OBJECT_MAX is then ignored.  The
response file contains objects and libraries.

If QMAKE_RESPONSEFILE_THRESHOLD is not set, use QMAKE_LINK_OBJECT_MAX to
determine whether to create a response file.  The response file contains
only object files.

QMAKE_LINK_OBJECT_SCRIPT is used in both cases to specify a common base
name of all linker response files.

Pick-to: 6.2 6.3
Task-number: QTBUG-100559
Change-Id: I3c78354fa5ebb1a86438ec804679e0ee776c3f49
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-02-21 12:37:19 +01:00
..
doc Doc: Mention how to interrupt/continue qmake loops 2022-01-08 18:08:08 +01:00
generators qmake: Fix overlong command lines for static Qt builds on Windows 2022-02-21 12:37:19 +01:00
library QMake: replace a Q_ASSERT() with a Q_UNREACHABLE() 2022-01-25 03:48:46 +01:00
cachekeys.h qmake: Clear caches before exiting 2021-05-06 23:49:20 +02:00
CMakeLists.txt Move the 'qmake' feature to src/tools/configure.cmake 2021-11-19 20:44:51 +01:00
main.cpp QDirIterator: add nextFileInfo() 2021-07-28 15:16:42 +02:00
meta.cpp qmake: Remove dead code 2019-04-05 07:48:34 +00:00
meta.h qmake: Remove dead code 2019-04-05 07:48:34 +00:00
option.cpp QLibraryInfo: remove load-time variable 2022-02-05 11:57:34 -08:00
option.h Move the common qmake sources into a object library 2021-03-11 15:46:34 +01:00
project.cpp qmake: Clear caches before exiting 2021-05-06 23:49:20 +02:00
project.h Port qmake from QStringRef to QStringView 2020-06-05 09:07:14 +02:00
property.cpp Add support for various output formats for QMakeProperty 2021-03-12 13:20:00 +01:00
property.h Add support for various output formats for QMakeProperty 2021-03-12 13:20:00 +01:00
propertyprinter.cpp Add support for various output formats for QMakeProperty 2021-03-12 13:20:00 +01:00
propertyprinter.h Add support for various output formats for QMakeProperty 2021-03-12 13:20:00 +01:00
qmake_pch.h Move QRegExp and its remaining mentions out of QtCore 2020-07-13 10:53:23 +02:00
qmakelibraryinfo.cpp Fix wrong QT_HOST_* values when qt.conf is present 2022-01-12 18:28:24 +01:00
qmakelibraryinfo.h Unify QLibraryInfo settings 2021-03-17 11:57:11 +01:00