From 72d1393c1d88a70c337e87c661bbeefe46346d23 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Thu, 1 Apr 2021 14:42:18 +0200 Subject: [PATCH 1/2] Fix condition that adds resources for each Android ABI If we already have the list of Android ABI in BUILDS, it's not necessary to generate extra resource while Qt build. Amends: 58556afb6960b442f88649b550aaec8e1a04338b Pick-to: 6.0 Pick-to: 6.1 Pick-to: 5.15 Fixes: QTBUG-88031 Change-Id: I344efe6c477461659a360281da59c4abeae18fc2 Reviewed-by: Alexandru Croitor --- mkspecs/features/resources_functions.prf | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mkspecs/features/resources_functions.prf b/mkspecs/features/resources_functions.prf index 729685db10c..b525f482cad 100644 --- a/mkspecs/features/resources_functions.prf +++ b/mkspecs/features/resources_functions.prf @@ -35,12 +35,10 @@ defineTest(qtFlattenResources) { } RESOURCES -= $$resource - !android { - isEmpty(BUILDS)|build_pass { - resource_file = $$absolute_path($$RCC_DIR/qmake_$${resource}.qrc, $$OUT_PWD) - RESOURCES += $$resource_file - } - } else { + isEmpty(BUILDS)|build_pass { + resource_file = $$absolute_path($$RCC_DIR/qmake_$${resource}.qrc, $$OUT_PWD) + RESOURCES += $$resource_file + } else: android { # Android will need a resource file for each architecture make sure it is placed # correctly for other functions that need the right paths for these files for (arch, ANDROID_ABIS) { From 3f0858ed10d249acb942597b4065080411281b87 Mon Sep 17 00:00:00 2001 From: Nikolay Avtomonov Date: Tue, 2 Oct 2018 17:40:29 +0300 Subject: [PATCH 2/2] Explicitly set output files for qtpreprocess MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes build error with XCode 10. XCode 10 build system (a.k.a "New Build System") requires all the files that are generated by scripts and used later on build to be explicitly defined as output files. Task-number: QTBUG-71035 Pick-to: 6.0 6.1 5.15 5.12 Change-Id: Ibec39eee53b0cb3acecf592f1ca53c04b9975cad Reviewed-by: Tor Arne Vestbø --- qmake/generators/mac/pbuilder_pbx.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index d99b7158c32..05534677a34 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -783,6 +783,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) { QString mkfile = pbx_dir + Option::dir_sep + "qt_preprocess.mak"; QFile mkf(mkfile); + ProStringList outputPaths; if(mkf.open(QIODevice::WriteOnly | QIODevice::Text)) { writingUnixMakefileGenerator = true; debug_msg(1, "pbuilder: Creating file: %s", mkfile.toLatin1().constData()); @@ -832,8 +833,10 @@ 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; + outputPaths << path; } } } @@ -844,6 +847,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) mkt.flush(); mkf.close(); } + // Remove duplicates from build steps with "combine" + outputPaths.removeDuplicates(); mkfile = fileFixify(mkfile); QString phase_key = keyFor("QMAKE_PBX_PREPROCESS_TARGET"); // project->values("QMAKE_PBX_BUILDPHASES").append(phase_key); @@ -854,6 +859,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("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"