koch boot: use different nimcaches for release and debug builds

This commit is contained in:
Andreas Rumpf
2016-08-26 15:16:02 +02:00
parent d3888577e9
commit 71a1bbffd7

View File

@@ -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!"