summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp2
-rw-r--r--qmake/generators/makefile.cpp2
-rw-r--r--qmake/generators/unix/unixmake2.cpp2
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp24
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp10
5 files changed, 15 insertions, 25 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index 5407ed6c69..07832041a7 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -856,7 +856,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
QString lib_file = QMakeMetaInfo::checkLib(Option::normalizePath(
(*lit) + Option::dir_sep + lib + Option::prl_ext));
if (!lib_file.isEmpty()) {
- QMakeMetaInfo libinfo(project);
+ QMakeMetaInfo libinfo;
if(libinfo.readLib(lib_file)) {
if(!libinfo.isEmpty("QMAKE_PRL_TARGET")) {
library = (*lit) + Option::dir_sep + libinfo.first("QMAKE_PRL_TARGET");
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 7364353183..b634ec622b 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -912,7 +912,7 @@ MakefileGenerator::processPrlFileCore(QString &origFile, const QStringRef &origN
const QString meta_file = QMakeMetaInfo::checkLib(fixedFile);
if (meta_file.isEmpty())
return false;
- QMakeMetaInfo libinfo(project);
+ QMakeMetaInfo libinfo;
debug_msg(1, "Processing PRL file: %s", meta_file.toLatin1().constData());
if (!libinfo.readLib(meta_file)) {
fprintf(stderr, "Error processing meta file %s\n", meta_file.toLatin1().constData());
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index fa283d0291..7d8c70ec3b 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -407,7 +407,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
const ProStringList &l = project->values("QMAKE_PRL_INTERNAL_FILES");
ProStringList::ConstIterator it;
for(it = l.begin(); it != l.end(); ++it) {
- QMakeMetaInfo libinfo(project);
+ QMakeMetaInfo libinfo;
if (libinfo.readLib((*it).toQString()) && !libinfo.isEmpty("QMAKE_PRL_BUILD_DIR")) {
ProString dir;
int slsh = (*it).lastIndexOf(Option::dir_sep);
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index f295705e2e..63d89a5388 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -165,21 +165,17 @@ QString NmakeMakefileGenerator::var(const ProKey &value) const
|| value == "QMAKE_RUN_CXX_IMP"
|| value == "QMAKE_RUN_CXX");
if ((isRunCpp && usePCH) || (isRunC && usePCHC)) {
- QFileInfo precompHInfo(fileInfo(precompH));
- QString precompH_f = escapeFilePath(precompHInfo.fileName());
+ QString precompH_f = escapeFilePath(fileFixify(precompH, FileFixifyBackwards));
QString precompRule = QString("-c -FI%1 -Yu%2 -Fp%3")
.arg(precompH_f, precompH_f, escapeFilePath(isRunC ? precompPchC : precompPch));
+ // ### For clang_cl 8 we force inline methods to be compiled here instead
+ // linking them from a pch.o file. We do this by pretending we are also doing
+ // the pch.o generation step.
+ if (project->isActiveConfig("clang_cl"))
+ precompRule += QString(" -Xclang -building-pch-with-obj");
QString p = MakefileGenerator::var(value);
p.replace(QLatin1String("-c"), precompRule);
- // Cannot use -Gm with -FI & -Yu, as this gives an
- // internal compiler error, on the newer compilers
- // ### work-around for a VS 2003 bug. Move to some prf file or remove completely.
- p.remove("-Gm");
return p;
- } else if (value == "QMAKE_CXXFLAGS") {
- // Remove internal compiler error option
- // ### work-around for a VS 2003 bug. Move to some prf file or remove completely.
- return MakefileGenerator::var(value).remove("-Gm");
}
}
@@ -238,7 +234,10 @@ void NmakeMakefileGenerator::init()
precompObj = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch" + Option::obj_ext;
precompPch = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch.pch";
// Add linking of precompObj (required for whole precompiled classes)
- project->values("OBJECTS") += precompObj;
+ // ### For clang_cl we currently let inline methods be generated in the normal objects,
+ // since the PCH object is buggy (as of clang 8.0.0)
+ if (!project->isActiveConfig("clang_cl"))
+ project->values("OBJECTS") += precompObj;
// Add pch file to cleanup
project->values("QMAKE_CLEAN") += precompPch;
// Return to variable pool
@@ -248,7 +247,8 @@ void NmakeMakefileGenerator::init()
if (usePCHC) {
precompObjC = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch_c" + Option::obj_ext;
precompPchC = var("PRECOMPILED_DIR") + project->first("TARGET") + "_pch_c.pch";
- project->values("OBJECTS") += precompObjC;
+ if (!project->isActiveConfig("clang_cl"))
+ project->values("OBJECTS") += precompObjC;
project->values("QMAKE_CLEAN") += precompPchC;
project->values("PRECOMPILED_OBJECT_C") = ProStringList(precompObjC);
project->values("PRECOMPILED_PCH_C") = ProStringList(precompPchC);
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 06a96f7538..fd53ec2a6e 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1063,16 +1063,6 @@ void VcprojGenerator::initCompilerTool()
conf.compiler.PrecompiledHeaderFile = "$(IntDir)\\" + precompPch;
conf.compiler.PrecompiledHeaderThrough = project->first("PRECOMPILED_HEADER").toQString();
conf.compiler.ForcedIncludeFiles = project->values("PRECOMPILED_HEADER").toQStringList();
-
- if (conf.CompilerVersion <= NET2003) {
- // Minimal build option triggers an Internal Compiler Error
- // when used in conjunction with /FI and /Yu, so remove it
- // ### work-around for a VS 2003 bug. Move to some prf file or remove completely.
- project->values("QMAKE_CFLAGS_DEBUG").removeAll("-Gm");
- project->values("QMAKE_CFLAGS_DEBUG").removeAll("/Gm");
- project->values("QMAKE_CXXFLAGS_DEBUG").removeAll("-Gm");
- project->values("QMAKE_CXXFLAGS_DEBUG").removeAll("/Gm");
- }
}
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS"));