diff options
author | flywind <xzsflywind@gmail.com> | 2022-03-11 00:01:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 17:01:27 +0100 |
commit | 4c76f9f1523a72f560138709642c2d51ea365b85 (patch) | |
tree | 42e8cbc4690c66ddb190aab111a9258b1d7dde51 /compiler | |
parent | 6773ffa63d0b3ab8b8894e84ed417f4eaced9122 (diff) | |
download | Nim-4c76f9f1523a72f560138709642c2d51ea365b85.tar.gz |
support useVersion:1.6 (#19601)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/commands.nim | 4 | ||||
-rw-r--r-- | compiler/options.nim | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index 8e1d96860..b21b48801 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -1043,6 +1043,10 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; defineSymbol(conf.symbols, "NimMajor", "1") defineSymbol(conf.symbols, "NimMinor", "2") conf.globalOptions.incl optNimV12Emulation + of "1.6": + defineSymbol(conf.symbols, "NimMajor", "1") + defineSymbol(conf.symbols, "NimMinor", "6") + conf.globalOptions.incl optNimV16Emulation else: localError(conf, info, "unknown Nim version; currently supported values are: `1.0`, `1.2`") # always be compatible with 1.x.100: diff --git a/compiler/options.nim b/compiler/options.nim index 5cfe58119..9c0c9df72 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -96,6 +96,7 @@ type # please make sure we have under 32 options optPanics # turn panics (sysFatal) into a process termination optNimV1Emulation # emulate Nim v1.0 optNimV12Emulation # emulate Nim v1.2 + optNimV16Emulation # emulate Nim v1.6 optSourcemap optProfileVM # enable VM profiler optEnableDeepCopy # ORC specific: enable 'deepcopy' for all types. |