Browse Source

Add incremental linking option for Visual Studio exporters

tags/2021-05-28
stefan.graenitz 9 years ago
parent
commit
61e71eb1dc
2 changed files with 16 additions and 0 deletions
  1. +15
    -0
      extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h
  2. +1
    -0
      extras/Projucer/Source/Utility/jucer_PresetIDs.h

+ 15
- 0
extras/Projucer/Source/Project Saving/jucer_ProjectExport_MSVC.h View File

@@ -335,6 +335,9 @@ protected:
Value shouldGenerateManifestValue() { return getValue (Ids::generateManifest); }
bool shouldGenerateManifest() const { return config [Ids::generateManifest]; }
Value shouldLinkIncrementalValue() { return getValue (Ids::enableIncrementalLinking); }
bool shouldLinkIncremental() const { return config [Ids::enableIncrementalLinking]; }
Value getWholeProgramOptValue() { return getValue (Ids::wholeProgramOptimisation); }
bool shouldDisableWholeProgramOpt() const { return static_cast<int> (config [Ids::wholeProgramOptimisation]) > 0; }
@@ -399,6 +402,12 @@ protected:
StringArray (wpoNames), Array<var> (wpoValues, numElementsInArray (wpoValues))));
}
{
props.add (new BooleanPropertyComponent (shouldLinkIncrementalValue(), "Incremental Linking", "Enable"),
"Enable to avoid linking from scratch for every new build. "
"Disable to ensure that your final release build does not contain padding or thunks.");
}
if (! isDebug())
props.add (new BooleanPropertyComponent (shouldGenerateDebugSymbolsValue(), "Debug Symbols", "Force generation of debug symbols"));
@@ -1026,6 +1035,7 @@ protected:
linker->setAttribute ("IgnoreDefaultLibraryNames", isDebug ? "libcmt.lib, msvcrt.lib" : "");
linker->setAttribute ("GenerateDebugInformation", (isDebug || config.shouldGenerateDebugSymbols()) ? "true" : "false");
linker->setAttribute ("LinkIncremental", config.shouldLinkIncremental() ? "2" : "1");
linker->setAttribute ("ProgramDatabaseFile", getIntDirFile (config, config.getOutputFilename (".pdb", true)));
linker->setAttribute ("SubSystem", msvcIsWindowsSubsystem ? "2" : "1");
@@ -1073,6 +1083,8 @@ protected:
linker->setAttribute ("OutputFile", getOutDirFile (config, config.getOutputFilename (msvcTargetSuffix, false)));
linker->setAttribute ("IgnoreDefaultLibraryNames", isDebug ? "libcmt.lib, msvcrt.lib" : "");
linker->setAttribute ("LinkIncremental", config.shouldLinkIncremental() ? "2" : "1");
}
else
{
@@ -1370,6 +1382,9 @@ protected:
if (! (config.isDebug() || config.shouldDisableWholeProgramOpt()))
e->createNewChildElement ("WholeProgramOptimization")->addTextElement ("true");
if (config.shouldLinkIncremental())
e->createNewChildElement ("LinkIncremental")->addTextElement ("true");
if (config.is64Bit())
e->createNewChildElement ("PlatformToolset")->addTextElement (getPlatformToolset());
}


+ 1
- 0
extras/Projucer/Source/Utility/jucer_PresetIDs.h View File

@@ -117,6 +117,7 @@ namespace Ids
DECLARE_ID (generateManifest);
DECLARE_ID (useRuntimeLibDLL);
DECLARE_ID (wholeProgramOptimisation);
DECLARE_ID (enableIncrementalLinking);
DECLARE_ID (buildVST);
DECLARE_ID (bundleIdentifier);
DECLARE_ID (aaxIdentifier);


Loading…
Cancel
Save