From 9017431249b06b9a253c750f95d1cb64238dcffe Mon Sep 17 00:00:00 2001 From: Jason Perkins Date: Wed, 23 Nov 2016 16:00:05 -0500 Subject: [PATCH] Fix VS'15 to match Update 3 --- src/actions/vstudio/vs2010_vcxproj.lua | 19 +++++++---- tests/actions/vstudio/vc2010/test_link.lua | 37 +++++++++++++++++++++- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index 798f4179..ef835249 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -391,12 +391,14 @@ if cfg.kind == p.STATICLIB then return { m.subSystem, + m.fullProgramDatabaseFile, m.generateDebugInformation, m.optimizeReferences, } else return { m.subSystem, + m.fullProgramDatabaseFile, m.generateDebugInformation, m.optimizeReferences, m.additionalDependencies, @@ -1294,6 +1296,7 @@ end end + function m.inlineFunctionExpansion(cfg) if cfg.inlining then local types = { @@ -1306,6 +1309,7 @@ end end + function m.forceIncludes(cfg, condition) if #cfg.forceincludes > 0 then local includes = vstudio.path(cfg, cfg.forceincludes) @@ -1322,6 +1326,13 @@ end + function m.fullProgramDatabaseFile(cfg) + if _ACTION >= "vs2015" and cfg.symbols == "FastLink" then + m.element("FullProgramDatabaseFile", nil, "true") + end + end + + function m.functionLevelLinking(cfg) if config.isOptimizedBuild(cfg) then m.element("FunctionLevelLinking", nil, "true") @@ -1332,13 +1343,9 @@ function m.generateDebugInformation(cfg) local lookup = {} if _ACTION >= "vs2015" then - lookup[p.ON] = "Debug" - lookup[p.OFF] = "No" + lookup[p.ON] = "true" + lookup[p.OFF] = "false" lookup["FastLink"] = "DebugFastLink" - - if cfg.symbols == "FastLink" then - m.element("FullProgramDatabaseFile", nil, "true") - end else lookup[p.ON] = "true" lookup[p.OFF] = "false" diff --git a/tests/actions/vstudio/vc2010/test_link.lua b/tests/actions/vstudio/vc2010/test_link.lua index 7955f84e..de014900 100644 --- a/tests/actions/vstudio/vc2010/test_link.lua +++ b/tests/actions/vstudio/vc2010/test_link.lua @@ -129,7 +129,8 @@ -- Test the handling of the Symbols flag. -- - function suite.generateDebugInfo_onSymbols() + function suite.generateDebugInfo_onSymbolsOn_on2010() + premake.action.set("vs2010") symbols "On" prepare() test.capture [[ @@ -139,6 +140,40 @@ ]] end + function suite.generateDebugInfo_onSymbolsFastLink_on2010() + premake.action.set("vs2010") + symbols "FastLink" + prepare() + test.capture [[ + + Windows + true + ]] + end + + function suite.generateDebugInfo_onSymbolsOn_on2015() + premake.action.set("vs2015") + symbols "On" + prepare() + test.capture [[ + + Windows + true + ]] + end + + function suite.generateDebugInfo_onSymbolsFastLink_on2015() + premake.action.set("vs2015") + symbols "FastLink" + prepare() + test.capture [[ + + Windows + true + DebugFastLink + ]] + end + -- -- Any system libraries specified in links() should be listed as