Skip to content

Commit

Permalink
qmake: Remove special-handling of cl.exe's -Gm option
Browse files Browse the repository at this point in the history
The comment hints that it's fixing an issue in Visual Studio 2013, which
we don't support anymore.

In all supported Visual Studio Versions -Gm is actually deprecated
anyhow, and not set anymore by default. So I guess it's safe
to remove the special handling here.

Change-Id: I2e8ff85350ba651d9a763aabba7b6494ba88d82e
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
kkoehne committed Apr 9, 2019
1 parent ffc71a9 commit 8cd0a39
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
8 changes: 0 additions & 8 deletions qmake/generators/win32/msvc_nmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,7 @@ QString NmakeMakefileGenerator::var(const ProKey &value) const
.arg(precompH_f, precompH_f, escapeFilePath(isRunC ? precompPchC : precompPch));
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");
}
}

Expand Down
10 changes: 0 additions & 10 deletions qmake/generators/win32/msvc_vcproj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 8cd0a39

Please sign in to comment.