diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-08-07 12:17:06 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-08-15 10:55:52 +0000 |
commit | 8bebded9ab02b8eec67c44bfddf802d6bf9cda3c (patch) | |
tree | 6edb320ef4ad9853b24d72a62c265d7577e8c07a /qmake | |
parent | d64abf8166d362b0fdc34c7f21aa32641063c01b (diff) | |
download | qtbase-8bebded9ab02b8eec67c44bfddf802d6bf9cda3c.tar.gz |
qmake: don't limit command line length when not actually on windows
QMAKE_LINK_OBJECT_MAX is actually a property of the host, not the
target.
this works around binutil's inability to use thin LTO objects in
conjunction with an MRI script
(https://sourceware.org/bugzilla/show_bug.cgi?id=21702).
Task-number: QTBUG-61335
Change-Id: I90a1334b9c905c433b35546e8f3f3b5089d2c65b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index c3b876531c..bad53dc5b7 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -285,7 +285,8 @@ void MingwMakefileGenerator::writeLibsPart(QTextStream &t) void MingwMakefileGenerator::writeObjectsPart(QTextStream &t) { - if (project->values("OBJECTS").count() < var("QMAKE_LINK_OBJECT_MAX").toInt()) { + const ProString &objmax = project->first("QMAKE_LINK_OBJECT_MAX"); + if (objmax.isEmpty() || project->values("OBJECTS").count() < objmax.toInt()) { objectsLinkLine = "$(OBJECTS)"; } else if (project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") { QString ar_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET"); |