From 04a7cd15463a5102ef4bd8edbaaa3713f1916d13 Mon Sep 17 00:00:00 2001 From: Manu Evans Date: Sun, 26 Jul 2015 11:08:44 +1000 Subject: [PATCH] Silence warnings about arguments unknown to Clang, fixed a mistake --- src/actions/vstudio/vs2010_vcxproj.lua | 9 ++++++--- tests/actions/vstudio/vc2010/test_platform_toolset.lua | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index d32e1281..f3ea0c4b 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -1076,13 +1076,15 @@ function m.debugInformationFormat(cfg) local value + local tool, toolVersion = p.config.toolset(cfg) if cfg.flags.Symbols then if cfg.debugformat == "c7" then value = "OldStyle" elseif cfg.architecture == "x86_64" or cfg.clr ~= p.OFF or config.isOptimizedBuild(cfg) or - cfg.editandcontinue == p.OFF + cfg.editandcontinue == p.OFF or + (toolVersion and toolVersion:startswith("LLVM-vs")) then value = "ProgramDatabase" else @@ -1509,7 +1511,7 @@ function m.platformToolset(cfg) local tool, version = p.config.toolset(cfg) if version then - if tonumber(version) ~= nil then + if tonumber(version:sub(1,3)) ~= nil then version = "v" .. version end else @@ -1683,7 +1685,8 @@ end function m.bufferSecurityCheck(cfg) - if cfg.flags.NoBufferSecurityCheck then + local tool, toolVersion = p.config.toolset(cfg) + if cfg.flags.NoBufferSecurityCheck or (toolVersion and toolVersion:startswith("LLVM-vs")) then m.element("BufferSecurityCheck", nil, "false") end end diff --git a/tests/actions/vstudio/vc2010/test_platform_toolset.lua b/tests/actions/vstudio/vc2010/test_platform_toolset.lua index 19b54c2d..59b81475 100644 --- a/tests/actions/vstudio/vc2010/test_platform_toolset.lua +++ b/tests/actions/vstudio/vc2010/test_platform_toolset.lua @@ -87,7 +87,7 @@ ]] end - function suite.canOverrideFromScript_withV() + function suite.canOverrideFromScript_withXP() toolset "v120_xp" prepare() test.capture [[ @@ -95,7 +95,7 @@ ]] end - function suite.canOverrideFromScript_withV() + function suite.canOverrideFromScript_withLLVM() toolset "LLVM-vs2010" prepare() test.capture [[ @@ -103,7 +103,7 @@ ]] end - function suite.canOverrideFromScript_withMsc() + function suite.canOverrideFromScript_withMscAndLLVM() toolset "msc-llvm-vs2014_xp" prepare() test.capture [[