Symbols API. (#523)

* Symbols API.

* presedence bugfix.
This commit is contained in:
Tom van Dijck 2016-06-22 08:36:42 -07:00 committed by GitHub
parent 6b30ce5908
commit c947338945
5 changed files with 33 additions and 11 deletions

View File

@ -489,7 +489,7 @@
"SEH", -- DEPRECATED
"ShadowedVariables",
"StaticRuntime",
"Symbols",
"Symbols", -- DEPRECATED
"UndefinedIdentifiers",
"Unicode", -- DEPRECATED
"Unsafe", -- DEPRECATED
@ -945,6 +945,17 @@
}
}
api.register {
name = "symbols",
scope = "config",
kind = "string",
allowed = {
"Default",
"On",
"Off",
},
}
api.register {
name = "sysincludedirs",
scope = "config",
@ -1275,7 +1286,7 @@
exceptionhandling "Default"
end)
api.deprecateValue("flags", "Unsafe", nil,
api.deprecateValue("flags", "Unsafe", 'Use `clr "Unsafe"` instead',
function(value)
clr "Unsafe"
end,
@ -1285,7 +1296,7 @@
-- 18 Dec 2015
api.deprecateValue("flags", "Unicode", nil,
api.deprecateValue("flags", "Unicode", 'Use `characterset "Unicode"` instead',
function(value)
characterset "Unicode"
end,
@ -1293,6 +1304,16 @@
characterset "Default"
end)
-- 21 June 2016
api.deprecateValue("flags", "Symbols", 'Use `symbols "On"` instead',
function(value)
symbols "On"
end,
function(value)
symbols "Default"
end)
-----------------------------------------------------------------------------

View File

@ -254,7 +254,7 @@
--
function cs2005.debugProps(cfg)
if cfg.flags.Symbols then
if cfg.symbols == p.ON then
_p(2,'<DebugSymbols>true</DebugSymbols>')
_p(2,'<DebugType>full</DebugType>')
else

View File

@ -749,7 +749,7 @@
--
function m.symbols(cfg)
if not cfg.flags.Symbols then
if not (cfg.symbols == p.ON) then
return 0
elseif cfg.debugformat == "c7" then
return 1

View File

@ -1230,7 +1230,7 @@
function m.debugInformationFormat(cfg)
local value
local tool, toolVersion = p.config.toolset(cfg)
if cfg.flags.Symbols then
if cfg.symbols == p.ON then
if cfg.debugformat == "c7" then
value = "OldStyle"
elseif cfg.architecture == "x86_64" or
@ -1243,9 +1243,10 @@
else
value = "EditAndContinue"
end
end
if value then
m.element("DebugInformationFormat", nil, value)
if value then
m.element("DebugInformationFormat", nil, value)
end
end
end
@ -1368,7 +1369,7 @@
function m.generateDebugInformation(cfg)
m.element("GenerateDebugInformation", nil, tostring(cfg.flags.Symbols ~= nil))
m.element("GenerateDebugInformation", nil, tostring(cfg.symbols == p.ON))
end

View File

@ -87,7 +87,7 @@
function snc.getldflags(cfg)
local flags = { }
if not cfg.flags.Symbols then
if not (cfg.symbols == p.ON) then
table.insert(flags, "-s")
end