Skip to content

Commit 15e3813

Browse files
authored
add mm to compilesettings; deprecate gc (#19394)
1 parent d102b2f commit 15e3813

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

compiler/vmops.nim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ when defined(nimHasInvariant):
135135
of backend: result = $conf.backend
136136
of libPath: result = conf.libpath.string
137137
of gc: result = $conf.selectedGC
138+
of mm: result = $conf.selectedGC
138139

139140
proc querySettingSeqImpl(conf: ConfigRef, switch: BiggestInt): seq[string] =
140141
template copySeq(field: untyped): untyped =

lib/std/compilesettings.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ type
3232
backend ## the backend (eg: c|cpp|objc|js); both `nim doc --backend:js`
3333
## and `nim js` would imply backend=js
3434
libPath ## the absolute path to the stdlib library, i.e. nim's `--lib`, since 1.5.1
35-
gc ## gc selected
35+
gc {.deprecated.} ## gc selected
36+
mm ## memory management selected
3637

3738
MultipleValueSetting* {.pure.} = enum ## \
3839
## settings resulting in a seq of string values

tests/vm/tcompilesetting.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
discard """
2-
cmd: "nim c --nimcache:build/myNimCache --nimblePath:myNimblePath $file"
2+
cmd: "nim c --nimcache:build/myNimCache --nimblePath:myNimblePath --gc:arc $file"
33
joinable: false
44
"""
55

@@ -12,6 +12,7 @@ template main =
1212
doAssert "myNimblePath" in nimblePaths.querySettingSeq[0]
1313
doAssert querySetting(backend) == "c"
1414
doAssert fileExists(libPath.querySetting / "system.nim")
15+
doAssert querySetting(mm) == "arc"
1516

1617
static: main()
1718
main()

0 commit comments

Comments
 (0)