From 8bebded9ab02b8eec67c44bfddf802d6bf9cda3c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 7 Aug 2017 12:17:06 +0200 Subject: 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 --- qmake/generators/win32/mingw_make.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qmake') 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"); -- cgit v1.2.1