summaryrefslogtreecommitdiffstats
path: root/qmake/generators/mac
diff options
context:
space:
mode:
authorChristoph Keller <keller@conntac.net>2021-04-11 16:11:01 +0200
committerChristoph Keller <keller@conntac.net>2021-04-12 11:36:32 +0200
commit8115219407fdbe7c01e97c76ccf3aa48b1fd8f78 (patch)
treec75fb57b652d2285fc1ead4c5501d0ca6a7bc59f /qmake/generators/mac
parente90dda731453967a6d9e3adb34890cdf6858240c (diff)
Explicitly set input files for qtpreprocess
This fixes build errors with Xcode 10. Xcode 10 build system (a.k.a "New Build System") needs to know the input files in order to build a correct dependency graph. Especially when a build is not run for the first time and files changed in-between. Task-number: QTBUG-71035 Pick-to: 6.0 6.1 5.15 5.12 Change-Id: If8fbad3a1915add9b35c79131b03cdbe6b7ac06d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'qmake/generators/mac')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index 05534677a3..c1c9336c92 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -784,6 +784,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
QString mkfile = pbx_dir + Option::dir_sep + "qt_preprocess.mak";
QFile mkf(mkfile);
ProStringList outputPaths;
+ ProStringList inputPaths;
if(mkf.open(QIODevice::WriteOnly | QIODevice::Text)) {
writingUnixMakefileGenerator = true;
debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData());
@@ -836,6 +837,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
QString path = escapeDependencyPath(Option::fixPathToTargetOS(
replaceExtraCompilerVariables(tmpOut, file_name, QString(), NoShell)));
mkt << ' ' << path;
+ inputPaths << fn;
outputPaths << path;
}
}
@@ -849,6 +851,12 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
}
// Remove duplicates from build steps with "combine"
outputPaths.removeDuplicates();
+
+ // Don't create cycles. We only have one qt_preprocess.mak which runs different compilers
+ // whose inputs may depend on the output of another. The "compilers" step will run all
+ // compilers anyway
+ inputPaths.removeEach(outputPaths);
+
mkfile = fileFixify(mkfile);
QString phase_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET");
// project->values("QMAKE_PBX_BUILDPHASES").append(phase_key);
@@ -859,6 +867,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
<< "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n"
<< "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
<< "\t\t\t" << writeSettings("name", "Qt Preprocessors") << ";\n"
+ << "\t\t\t" << writeSettings("inputPaths", inputPaths, SettingsAsList, 4) << ";\n"
<< "\t\t\t" << writeSettings("outputPaths", outputPaths, SettingsAsList, 4) << ";\n"
<< "\t\t\t" << writeSettings("shellPath", "/bin/sh") << ";\n"
<< "\t\t\t" << writeSettings("shellScript", "make -C " + IoUtils::shellQuoteUnix(Option::output_dir)