MSVC: Remove useless (and disabled) /LTCG linker flag

`global.params.optimize` is never changed from its initial `false` state.
When experimentally enabling it, the MS linker produces warnings like

LINK : /LTCG specified but no code generation required; remove /LTCG from
the link command line to improve linker performance
This commit is contained in:
Martin 2017-05-12 23:40:07 +02:00
parent 25144d6a88
commit a38cae7831

View file

@ -541,11 +541,6 @@ static int linkObjToBinaryMSVC(bool sharedLib) {
args.push_back("/DEBUG");
}
// enable Link-time Code Generation (aka. whole program optimization)
if (global.params.optimize) {
args.push_back("/LTCG");
}
// remove dead code and fold identical COMDATs
if (opts::disableLinkerStripDead) {
args.push_back("/OPT:NOREF");
@ -679,11 +674,6 @@ int createStaticLibrary() {
args.push_back("/NOLOGO");
}
// enable Link-time Code Generation (aka. whole program optimization)
if (isTargetMSVC && global.params.optimize) {
args.push_back("/LTCG");
}
// output filename
std::string libName;
if (global.params.libname) { // explicit