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
|
end
|
||||||
|
|
||||||
vc200x.additionalIncludeDirectories(cfg, cfg.includedirs)
|
vc200x.additionalIncludeDirectories(cfg, cfg.includedirs)
|
||||||
|
vc200x.wholeProgramOptimization(cfg)
|
||||||
vc200x.preprocessorDefinitions(cfg, cfg.defines)
|
vc200x.preprocessorDefinitions(cfg, cfg.defines)
|
||||||
|
|
||||||
vc200x.minimalRebuild(cfg)
|
vc200x.minimalRebuild(cfg)
|
||||||
@ -923,6 +924,13 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function vc200x.wholeProgramOptimization(cfg)
|
||||||
|
if cfg.flags.LinkTimeOptimization then
|
||||||
|
_x(4,'WholeProgramOptimization="true"')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function vc200x.additionalLibraryDirectories(cfg)
|
function vc200x.additionalLibraryDirectories(cfg)
|
||||||
if #cfg.libdirs > 0 then
|
if #cfg.libdirs > 0 then
|
||||||
local dirs = table.concat(project.getrelative(cfg.project, cfg.libdirs), ";")
|
local dirs = table.concat(project.getrelative(cfg.project, cfg.libdirs), ";")
|
||||||
|
@ -171,6 +171,7 @@
|
|||||||
"useOfMfc",
|
"useOfMfc",
|
||||||
"clrSupport",
|
"clrSupport",
|
||||||
"characterSet",
|
"characterSet",
|
||||||
|
"wholeProgramOptimization",
|
||||||
"nmakeOutDirs",
|
"nmakeOutDirs",
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -644,6 +645,11 @@
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function vc2010.wholeProgramOptimization(cfg)
|
||||||
|
if cfg.flags.LinkTimeOptimization then
|
||||||
|
_p(2,'<WholeProgramOptimization>true</WholeProgramOptimization>')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function vc2010.clCompileAdditionalIncludeDirectories(cfg)
|
function vc2010.clCompileAdditionalIncludeDirectories(cfg)
|
||||||
vc2010.additionalIncludeDirectories(cfg, cfg.includedirs)
|
vc2010.additionalIncludeDirectories(cfg, cfg.includedirs)
|
||||||
|
@ -713,6 +713,7 @@
|
|||||||
"FatalWarnings",
|
"FatalWarnings",
|
||||||
"FloatFast",
|
"FloatFast",
|
||||||
"FloatStrict",
|
"FloatStrict",
|
||||||
|
"LinkTimeOptimization",
|
||||||
"Managed",
|
"Managed",
|
||||||
"MFC",
|
"MFC",
|
||||||
"MultiProcessorCompile",
|
"MultiProcessorCompile",
|
||||||
|
@ -572,3 +572,19 @@
|
|||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
]]
|
]]
|
||||||
end
|
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>
|
</PropertyGroup>
|
||||||
]]
|
]]
|
||||||
end
|
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