diff options
author | flywind <xzsflywind@gmail.com> | 2022-01-17 04:10:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-16 21:10:35 +0100 |
commit | 15e3813d96ad5646476b629f3a20ece89dff064d (patch) | |
tree | c7173658778b86b2dc3fec3b4c5f2243e6a0374a | |
parent | d102b2f54c41f19a0545f28109d0a93550b5d886 (diff) | |
download | Nim-15e3813d96ad5646476b629f3a20ece89dff064d.tar.gz |
add mm to compilesettings; deprecate gc (#19394)
-rw-r--r-- | compiler/vmops.nim | 1 | ||||
-rw-r--r-- | lib/std/compilesettings.nim | 3 | ||||
-rw-r--r-- | tests/vm/tcompilesetting.nim | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/compiler/vmops.nim b/compiler/vmops.nim index 22a632ee9..018e7b9c6 100644 --- a/compiler/vmops.nim +++ b/compiler/vmops.nim @@ -135,6 +135,7 @@ when defined(nimHasInvariant): of backend: result = $conf.backend of libPath: result = conf.libpath.string of gc: result = $conf.selectedGC + of mm: result = $conf.selectedGC proc querySettingSeqImpl(conf: ConfigRef, switch: BiggestInt): seq[string] = template copySeq(field: untyped): untyped = diff --git a/lib/std/compilesettings.nim b/lib/std/compilesettings.nim index 5bb0bd673..6d8bd22f4 100644 --- a/lib/std/compilesettings.nim +++ b/lib/std/compilesettings.nim @@ -32,7 +32,8 @@ type backend ## the backend (eg: c|cpp|objc|js); both `nim doc --backend:js` ## and `nim js` would imply backend=js libPath ## the absolute path to the stdlib library, i.e. nim's `--lib`, since 1.5.1 - gc ## gc selected + gc {.deprecated.} ## gc selected + mm ## memory management selected MultipleValueSetting* {.pure.} = enum ## \ ## settings resulting in a seq of string values diff --git a/tests/vm/tcompilesetting.nim b/tests/vm/tcompilesetting.nim index 5bf559c74..d6c08e70f 100644 --- a/tests/vm/tcompilesetting.nim +++ b/tests/vm/tcompilesetting.nim @@ -1,5 +1,5 @@ discard """ -cmd: "nim c --nimcache:build/myNimCache --nimblePath:myNimblePath $file" +cmd: "nim c --nimcache:build/myNimCache --nimblePath:myNimblePath --gc:arc $file" joinable: false """ @@ -12,6 +12,7 @@ template main = doAssert "myNimblePath" in nimblePaths.querySettingSeq[0] doAssert querySetting(backend) == "c" doAssert fileExists(libPath.querySetting / "system.nim") + doAssert querySetting(mm) == "arc" static: main() main() |