koch: bootstrap with C++ for NIM_COMPILE_TO_CPP env var

This commit is contained in:
Araq
2018-10-18 10:58:28 +02:00
parent 505571f31c
commit d2ca808106

View File

@@ -272,7 +272,8 @@ proc boot(args: string) =
var output = "compiler" / "nim".exe
var finalDest = "bin" / "nim".exe
# default to use the 'c' command:
let bootOptions = if args.len == 0 or args.startsWith("-"): "c" else: ""
let defaultCommand = if getEnv("NIM_COMPILE_TO_CPP", "false") == "true": "cpp" else: "c"
let bootOptions = if args.len == 0 or args.startsWith("-"): defaultCommand else: ""
let smartNimcache = (if "release" in args: "nimcache/r_" else: "nimcache/d_") &
hostOs & "_" & hostCpu