Add new editAndContinue() API to replace NoEditAndContinue flag

Make it easier and more intuitive to support platforms/toolsets where edit-and-continue is available but turned off by default. Can now turn off with editAndContinue("off") instead of flags("NoEditAndContinue"), and turn it on with editAndContinue("on") instead of removeflags("NoEditAndContinue").

The NoEditAndContinue flag is still in place, and continues to behave as it did before, but will be marked deprecated in the documentation.
This commit is contained in:
Jason Perkins 2014-11-10 18:01:39 -05:00
parent 3b960f01be
commit b3aebffaf2
4 changed files with 27 additions and 6 deletions

View File

@ -234,6 +234,13 @@
}
api.register {
name = "editAndContinue",
scope = "config",
kind = "boolean",
}
-- For backward compatibility, excludes() is now an alias for removefiles()
function excludes(value)
removefiles(value)
@ -285,7 +292,7 @@
"NativeWChar", -- DEPRECATED
"No64BitChecks",
"NoCopyLocal",
"NoEditAndContinue",
"NoEditAndContinue", -- DEPRECATED
"NoExceptions",
"NoFramePointer",
"NoImplicitLink",
@ -847,6 +854,17 @@
warnings "Default"
end)
-- 10 Nov 2014
api.deprecateValue("flags", "NoEditAndContinue", nil,
function(value)
editAndContinue "Off"
end,
function(value)
editAndContinue "On"
end)
-----------------------------------------------------------------------------
--
@ -947,6 +965,8 @@
--
-----------------------------------------------------------------------------
editAndContinue "On"
-- Setting a default language makes some validation easier later
language "C++"

View File

@ -749,7 +749,7 @@
return 1
else
-- Edit-and-continue doesn't work for some configurations
if cfg.flags.NoEditAndContinue or
if not cfg.editAndContinue or
config.isOptimizedBuild(cfg) or
cfg.flags.Managed or
cfg.system == "x64"

View File

@ -994,7 +994,7 @@
elseif cfg.architecture == "x64" or
cfg.flags.Managed or
config.isOptimizedBuild(cfg) or
cfg.flags.NoEditAndContinue
not cfg.editAndContinue
then
value = "ProgramDatabase"
else

View File

@ -569,11 +569,12 @@
--
-- Check the handling of the NoEditAndContinue flag.
-- Check the handling of the editAndContinue flag.
--
function suite.debugFormat_onNoEditAndContinue()
flags { "Symbols", "NoEditAndContinue" }
function suite.debugFormat_onEditAndContinueOff()
flags { "Symbols" }
editAndContinue "Off"
prepare()
test.capture [[
<ClCompile>