Add new API clr() to replace existing Managed and Unsafe flags

A new API is needed to add support for "pure" and "safe" managed C++ code. The existing flags will be marked as deprecated in the documentation, but otherwise left intact.
This commit is contained in:
Jason Perkins 2014-11-11 19:20:09 -05:00
parent facc0cb1a7
commit 77d75071fd

View File

@ -130,18 +130,35 @@
tokens = true,
}
api.register {
name = "cleanExtensions",
scope = "config",
kind = "list:string",
}
api.register {
name = "clr",
scope = "config",
kind = "string",
allowed = {
"Off",
"On",
"Pure",
"Safe",
"Unsafe",
}
}
api.register {
name = "configmap",
scope = "config",
kind = "list:keyed:array:string",
}
api.register {
name = "configFile",
scope = "config",
@ -285,7 +302,7 @@
"FloatFast", -- DEPRECATED
"FloatStrict", -- DEPRECATED
"LinkTimeOptimization",
"Managed",
"Managed", -- DEPRECATED
"Maps",
"MFC",
"MultiProcessorCompile",
@ -317,7 +334,7 @@
"Symbols",
"UndefinedIdentifiers",
"Unicode",
"Unsafe",
"Unsafe", -- DEPRECATED
"WinMain",
"WPF",
},
@ -793,6 +810,7 @@
buildoutputs(value.outputs)
end)
-- 17 Jun 2013
api.deprecateValue("flags", "Component", nil,
@ -800,6 +818,7 @@
buildaction "Component"
end)
-- 26 Sep 2013
api.deprecateValue("flags", { "EnableSSE", "EnableSSE2" }, nil,
@ -810,6 +829,7 @@
vectorextension "Default"
end)
api.deprecateValue("flags", { "FloatFast", "FloatStrict" }, nil,
function(value)
floatingpoint(value:sub(6))
@ -818,6 +838,7 @@
floatingpoint "Default"
end)
api.deprecateValue("flags", { "NativeWChar", "NoNativeWChar" }, nil,
function(value)
local map = { NativeWChar = "On", NoNativeWChar = "Off" }
@ -827,6 +848,7 @@
nativewchar "Default"
end)
api.deprecateValue("flags", { "Optimize", "OptimizeSize", "OptimizeSpeed" }, nil,
function(value)
local map = { Optimize = "On", OptimizeSize = "Size", OptimizeSpeed = "Speed" }
@ -836,6 +858,7 @@
optimize "Off"
end)
api.deprecateValue("flags", { "Optimise", "OptimiseSize", "OptimiseSpeed" }, nil,
function(value)
local map = { Optimise = "On", OptimiseSize = "Size", OptimiseSpeed = "Speed" }
@ -845,6 +868,7 @@
optimize "Off"
end)
api.deprecateValue("flags", { "ExtraWarnings", "NoWarnings" }, nil,
function(value)
local map = { ExtraWarnings = "Extra", NoWarnings = "Off" }
@ -854,8 +878,18 @@
warnings "Default"
end)
-- 10 Nov 2014
api.deprecateValue("flags", "Managed", nil,
function(value)
clr "On"
end,
function(value)
clr "Off"
end)
api.deprecateValue("flags", "NoEditAndContinue", nil,
function(value)
editAndContinue "Off"
@ -865,6 +899,15 @@
end)
api.deprecateValue("flags", "Unsafe", nil,
function(value)
clr "Unsafe"
end,
function(value)
clr "On"
end)
-----------------------------------------------------------------------------
--
@ -965,6 +1008,7 @@
--
-----------------------------------------------------------------------------
clr "Off"
editAndContinue "On"
-- Setting a default language makes some validation easier later