Merged in dcourtois/premake-dev/LinkTimeOptimization (pull request #60)
added support for LinkTimeOptimization flag
This commit is contained in:
commit
afb281b320
@ -398,6 +398,7 @@
|
||||
end
|
||||
|
||||
vc200x.additionalIncludeDirectories(cfg, cfg.includedirs)
|
||||
vc200x.wholeProgramOptimization(cfg)
|
||||
vc200x.preprocessorDefinitions(cfg, cfg.defines)
|
||||
|
||||
vc200x.minimalRebuild(cfg)
|
||||
@ -923,6 +924,13 @@
|
||||
end
|
||||
|
||||
|
||||
function vc200x.wholeProgramOptimization(cfg)
|
||||
if cfg.flags.LinkTimeOptimization then
|
||||
_x(4,'WholeProgramOptimization="true"')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function vc200x.additionalLibraryDirectories(cfg)
|
||||
if #cfg.libdirs > 0 then
|
||||
local dirs = table.concat(project.getrelative(cfg.project, cfg.libdirs), ";")
|
||||
|
@ -171,6 +171,7 @@
|
||||
"useOfMfc",
|
||||
"clrSupport",
|
||||
"characterSet",
|
||||
"wholeProgramOptimization",
|
||||
"nmakeOutDirs",
|
||||
}
|
||||
|
||||
@ -644,6 +645,11 @@
|
||||
end
|
||||
end
|
||||
|
||||
function vc2010.wholeProgramOptimization(cfg)
|
||||
if cfg.flags.LinkTimeOptimization then
|
||||
_p(2,'<WholeProgramOptimization>true</WholeProgramOptimization>')
|
||||
end
|
||||
end
|
||||
|
||||
function vc2010.clCompileAdditionalIncludeDirectories(cfg)
|
||||
vc2010.additionalIncludeDirectories(cfg, cfg.includedirs)
|
||||
|
@ -713,6 +713,7 @@
|
||||
"FatalWarnings",
|
||||
"FloatFast",
|
||||
"FloatStrict",
|
||||
"LinkTimeOptimization",
|
||||
"Managed",
|
||||
"MFC",
|
||||
"MultiProcessorCompile",
|
||||
|
@ -572,3 +572,19 @@
|
||||
RuntimeLibrary="0"
|
||||
]]
|
||||
end
|
||||
|
||||
--
|
||||
-- Check the LinkTimeOptimization flag.
|
||||
--
|
||||
|
||||
function suite.flags_onLinkTimeOptimization()
|
||||
flags { "LinkTimeOptimization" }
|
||||
prepare()
|
||||
test.capture [[
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
WholeProgramOptimization="true"
|
||||
]]
|
||||
|
||||
end
|
||||
|
@ -203,3 +203,20 @@
|
||||
</PropertyGroup>
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Check the LinkTimeOptimization flag
|
||||
--
|
||||
|
||||
function suite.useOfLinkTimeOptimization()
|
||||
flags { "LinkTimeOptimization" }
|
||||
prepare()
|
||||
test.capture [[
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
]]
|
||||
end
|
Loading…
Reference in New Issue
Block a user