summary refs log tree commit diff stats
path: root/compiler/commands.nim
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2020-10-14 16:07:25 +0200
committerGitHub <noreply@github.com>2020-10-14 16:07:25 +0200
commit977bccdbff9db889bebfa963d1292c4d433f6779 (patch)
tree6a1902216dd16946194f788aca67b372bd7856aa /compiler/commands.nim
parent89781124579fdf7fe884aca093ed9348195a57af (diff)
downloadNim-977bccdbff9db889bebfa963d1292c4d433f6779.tar.gz
Make useVersion:1.0 disable the proc arg sym change (#15570)
* Make useVersion:1.0 disable the proc arg sym change

* Also do this for useVersion:1.2
Diffstat (limited to 'compiler/commands.nim')
-rw-r--r--compiler/commands.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index 3c6cc5919..b9199c1b0 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -883,6 +883,12 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
       undefSymbol(conf.symbols, "nimDoesntTrackDefects")
       ast.eqTypeFlags.excl {tfGcSafe, tfNoSideEffect}
       conf.globalOptions.incl optNimV1Emulation
+    of "1.2":
+      defineSymbol(conf.symbols, "NimMajor", "1")
+      defineSymbol(conf.symbols, "NimMinor", "2")
+      # always be compatible with 1.2.100:
+      defineSymbol(conf.symbols, "NimPatch", "100")
+      conf.globalOptions.incl optNimV12Emulation
     else:
       localError(conf, info, "unknown Nim version; currently supported values are: {1.0}")
   of "benchmarkvm":