introduce --newruntime switch for the upcoming destructors and move semantics

This commit is contained in:
Andreas Rumpf 2017-10-13 06:38:59 +02:00
commit 63530be0b8
6 changed files with 19 additions and 11 deletions

View file

@ -666,6 +666,10 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
expectArg(switch, arg, pass, info)
if config != nil:
config.cppDefine(arg)
of "newruntime":
expectNoArg(switch, arg, pass, info)
newDestructors = true
defineSymbol("nimNewRuntime")
else:
if strutils.find(switch, '.') >= 0: options.setConfigVar(switch, arg)
else: invalidCmdLineOption(pass, switch, info)