[pkg-d-commits] [ldc] 20/74: MSVC: Remove useless (and disabled) /LTCG linker flag

Matthias Klumpp mak at moszumanska.debian.org
Thu Jul 13 20:54:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v1.3.0-beta2
in repository ldc.

commit a38cae7831cb255d4169930504ef5b807b992d21
Author: Martin <noone at nowhere.com>
Date:   Fri May 12 23:40:07 2017 +0200

    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
---
 driver/linker.cpp | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/driver/linker.cpp b/driver/linker.cpp
index e995048..5b6ae27 100644
--- a/driver/linker.cpp
+++ b/driver/linker.cpp
@@ -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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list