1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-02 03:20:06 +00:00

Projucer: Fixed a bug in the VS exporter where link time optimisation settings were being ignored

This commit is contained in:
ed 2017-11-16 16:51:50 +00:00
parent a4ef96a9d6
commit 370cf229c6

View file

@ -167,7 +167,10 @@ public:
setValueIfVoid (getPluginBinaryCopyStepEnabledValue(), false);
if (! isDebug())
{
updateOldLTOSetting();
setValueIfVoid (getLinkTimeOptimisationEnabledValue(), true);
}
initialisePluginCachedValues();
}
@ -334,7 +337,8 @@ public:
//==============================================================================
void updateOldLTOSetting()
{
getLinkTimeOptimisationEnabledValue() = (static_cast<int> (config ["wholeProgramOptimisation"]) == 0);
if (config.getPropertyAsValue ("wholeProgramOptimisation", nullptr) != Value())
getLinkTimeOptimisationEnabledValue() = (static_cast<int> (config ["wholeProgramOptimisation"]) == 0);
}
void addVisualStudioPluginInstallPathProperties (PropertyListBuilder& props)
@ -441,15 +445,14 @@ public:
e->setAttribute ("Label", "Configuration");
e->createNewChildElement ("ConfigurationType")->addTextElement (getProjectType());
e->createNewChildElement ("UseOfMfc")->addTextElement ("false");
e->createNewChildElement ("WholeProgramOptimization")->addTextElement (config.isLinkTimeOptimisationEnabled() ? "true"
: "false");
const String charSet (config.getCharacterSet());
if (charSet.isNotEmpty())
e->createNewChildElement ("CharacterSet")->addTextElement (charSet);
if (config.isLinkTimeOptimisationEnabled())
e->createNewChildElement ("WholeProgramOptimization")->addTextElement ("true");
if (config.shouldLinkIncremental())
e->createNewChildElement ("LinkIncremental")->addTextElement ("true");