mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
koch boot: use different nimcaches for release and debug builds
This commit is contained in:
4
koch.nim
4
koch.nim
@@ -244,11 +244,13 @@ proc boot(args: string) =
|
||||
var finalDest = "bin" / "nim".exe
|
||||
# default to use the 'c' command:
|
||||
let bootOptions = if args.len == 0 or args.startsWith("-"): "c" else: ""
|
||||
let smartNimcache = if "release" in args: "rnimcache" else: "dnimcache"
|
||||
|
||||
copyExe(findStartNim(), 0.thVersion)
|
||||
for i in 0..2:
|
||||
echo "iteration: ", i+1
|
||||
exec i.thVersion & " $# $# compiler" / "nim.nim" % [bootOptions, args]
|
||||
exec i.thVersion & " $# $# --nimcache:$# compiler" / "nim.nim" % [bootOptions, args,
|
||||
smartNimcache]
|
||||
if sameFileContent(output, i.thVersion):
|
||||
copyExe(output, finalDest)
|
||||
echo "executables are equal: SUCCESS!"
|
||||
|
||||
Reference in New Issue
Block a user