mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
add mm to compilesettings; deprecate gc (#19394)
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user