summary refs log tree commit diff stats
path: root/koch.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-08-26 15:16:02 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-08-26 15:16:02 +0200
commit71a1bbffd73f4cc53aaee2fa824018e5b7a709a4 (patch)
treef75f334afd1f0f73cf4e57e002ad06c4e623ad74 /koch.nim
parentd3888577e9f0802abfcc92b9b7bda8b7f45996ed (diff)
downloadNim-71a1bbffd73f4cc53aaee2fa824018e5b7a709a4.tar.gz
koch boot: use different nimcaches for release and debug builds
Diffstat (limited to 'koch.nim')
-rw-r--r--koch.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/koch.nim b/koch.nim
index 04f6a4e4e..eb25a7480 100644
--- a/koch.nim
+++ b/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!"