koch boot: use different nimcaches for release and debug builds
This commit is contained in:
parent
d3888577e9
commit
71a1bbffd7
1 changed files with 3 additions and 1 deletions
4
koch.nim
4
koch.nim
|
|
@ -244,11 +244,13 @@ proc boot(args: string) =
|
||||||
var finalDest = "bin" / "nim".exe
|
var finalDest = "bin" / "nim".exe
|
||||||
# default to use the 'c' command:
|
# default to use the 'c' command:
|
||||||
let bootOptions = if args.len == 0 or args.startsWith("-"): "c" else: ""
|
let bootOptions = if args.len == 0 or args.startsWith("-"): "c" else: ""
|
||||||
|
let smartNimcache = if "release" in args: "rnimcache" else: "dnimcache"
|
||||||
|
|
||||||
copyExe(findStartNim(), 0.thVersion)
|
copyExe(findStartNim(), 0.thVersion)
|
||||||
for i in 0..2:
|
for i in 0..2:
|
||||||
echo "iteration: ", i+1
|
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):
|
if sameFileContent(output, i.thVersion):
|
||||||
copyExe(output, finalDest)
|
copyExe(output, finalDest)
|
||||||
echo "executables are equal: SUCCESS!"
|
echo "executables are equal: SUCCESS!"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue