qt6-bb10/qmake/generators/win32
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
..
mingw_make.cpp qmake: Fix overlong command lines for static Qt builds on Windows 2022-02-21 12:37:19 +01:00
mingw_make.h qmake: Fix overlong command lines for static Qt builds on Windows 2022-02-21 12:37:19 +01:00
msbuild_objectmodel.cpp qmake/vcxproj generator: Handle C standard compiler flags 2021-08-26 18:32:44 +02:00
msbuild_objectmodel.h
msvc_nmake.cpp QDirIterator: add nextFileInfo() 2021-07-28 15:16:42 +02:00
msvc_nmake.h
msvc_objectmodel.cpp qmake: Support Visual Studio 2022 2021-11-10 13:47:42 +00:00
msvc_objectmodel.h qmake: Support Visual Studio 2022 2021-11-10 13:47:42 +00:00
msvc_vcproj.cpp qmake: Introduce the variable MSVC_TOOLSET_VER 2021-11-10 14:47:42 +01:00
msvc_vcproj.h Fix dependency resolution for extra compilers in VS projects 2020-01-07 07:16:59 +01:00
msvc_vcxproj.cpp
msvc_vcxproj.h
winmakefile.cpp Use QList instead of QVector in qmake 2020-09-05 07:07:44 +02:00
winmakefile.h Port qmake from QStringRef to QStringView 2020-06-05 09:07:14 +02:00