Skip to content

Commit

Permalink
add mm to compilesettings; deprecate gc (#19394)
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout authored Jan 16, 2022
1 parent d102b2f commit 15e3813
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions compiler/vmops.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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

This comment has been minimized.

Copy link
@tjpalmer

tjpalmer Jan 19, 2022

Contributor

I get Error: undeclared identifier: 'mm' on this line trying to build. Should this be working? That is, am I doing something wrong? I'm just running ./koch temp or ./koch boot at the project root. And v1.6.2 builds for me.


proc querySettingSeqImpl(conf: ConfigRef, switch: BiggestInt): seq[string] =
template copySeq(field: untyped): untyped =
Expand Down
3 changes: 2 additions & 1 deletion lib/std/compilesettings.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tests/vm/tcompilesetting.nim
Original file line number Diff line number Diff line change
@@ -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
"""

Expand All @@ -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()

0 comments on commit 15e3813

Please sign in to comment.