mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 03:46:02 +03:00
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:
parent
25144d6a88
commit
a38cae7831
1 changed files with 0 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue