summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2022-04-07 15:21:56 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2022-04-07 15:21:56 +0300
commite89a6f03c4d24f18db36a906a7320035388504ba (patch)
tree47f7edb9faa26f6f4e2d3f2eea12133933d86e45 /qmake/generators
parentc8989ca20fa5798f7853f07df6e150cc407c64a4 (diff)
parent69b8ab23c93785dc69ae43ea04d5620656a4af44 (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.4' into tqtc/lts-5.15-opensource
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index c2f6df7787..a9d0125825 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -778,6 +778,8 @@ 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());
@@ -827,8 +829,11 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
++added;
const QString file_name = fileFixify(fn, FileFixifyFromOutdir);
const QString tmpOut = fileFixify(tmp_out.first().toQString(), FileFixifyFromOutdir);
- mkt << ' ' << escapeDependencyPath(Option::fixPathToTargetOS(
+ QString path = escapeDependencyPath(Option::fixPathToTargetOS(
replaceExtraCompilerVariables(tmpOut, file_name, QString(), NoShell)));
+ mkt << ' ' << path;
+ inputPaths << fn;
+ outputPaths << path;
}
}
}
@@ -839,6 +844,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
mkt.flush();
mkf.close();
}
+ // 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);
@@ -849,6 +862,8 @@ 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)
+ " -f " + IoUtils::shellQuoteUnix(mkfile)) << ";\n"