summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/mingw_make.cpp
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2019-11-04 15:54:24 +0100
committerAndy Shaw <andy.shaw@qt.io>2019-11-06 18:14:17 +0100
commitb274f656b82e06fad492e241dae6ae65cb377ad1 (patch)
treeb77a35cf15c94b6e89f7485a3eac89ca155130f3 /qmake/generators/win32/mingw_make.cpp
parent4ada4f283efe4b2adcde29c2139dfc502c120399 (diff)
Be able to create a response file for other generators too
When building an application for Android on Windows it is possible that the command line will be too long when doing the link step. So the code for generating a response file is moved to MakefileGenerator so it can be used by the other generators easily. The same variables used by MinGW can be used elsewhere then. Fixes: QTBUG-71940 Change-Id: I6c331d12e9541a90a4a95e0154d0ea1c056489bc Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'qmake/generators/win32/mingw_make.cpp')
-rw-r--r--qmake/generators/win32/mingw_make.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 878291fae9..096b041056 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -115,30 +115,6 @@ QString MingwMakefileGenerator::installRoot() const
return QStringLiteral("$(INSTALL_ROOT:@msyshack@%=%)");
}
-static void createResponseFile(const QString &fileName, const ProStringList &objList)
-{
- QString filePath = Option::output_dir + QDir::separator() + fileName;
- QFile file(filePath);
- if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
- QTextStream t(&file);
- for (ProStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) {
- QString path = (*it).toQString();
- // In response files, whitespace and special characters are
- // escaped with a backslash; backslashes themselves can either
- // be escaped into double backslashes, or, as this is a list of
- // path names, converted to forward slashes.
- path.replace(QLatin1Char('\\'), QLatin1String("/"))
- .replace(QLatin1Char(' '), QLatin1String("\\ "))
- .replace(QLatin1Char('\t'), QLatin1String("\\\t"))
- .replace(QLatin1Char('"'), QLatin1String("\\\""))
- .replace(QLatin1Char('\''), QLatin1String("\\'"));
- t << path << Qt::endl;
- }
- t.flush();
- file.close();
- }
-}
-
void MingwMakefileGenerator::writeMingwParts(QTextStream &t)
{
writeStandardParts(t);