fixes #10659 koch boot fails on windows (#10660)

This commit is contained in:
Timothee Cour 2019-02-18 03:18:52 -08:00 • committed by Andreas Rumpf
commit 1d66222901

View file

@ -291,13 +291,14 @@ proc boot(args: string) =
hostOs & "_" & hostCpu hostOs & "_" & hostCpu
let nimStart = findStartNim() let nimStart = findStartNim()
copyExe(nimStart, 0.thVersion)
for i in 0..2: for i in 0..2:
let defaultCommand = if useCpp: "cpp" else: "c" let defaultCommand = if useCpp: "cpp" else: "c"
let bootOptions = if args.len == 0 or args.startsWith("-"): defaultCommand else: "" let bootOptions = if args.len == 0 or args.startsWith("-"): defaultCommand else: ""
echo "iteration: ", i+1 echo "iteration: ", i+1
var extraOption = "" var extraOption = ""
var nimi = i.thVersion
if i == 0: if i == 0:
nimi = nimStart
extraOption.add " --skipUserCfg --skipParentCfg" extraOption.add " --skipUserCfg --skipParentCfg"
# The configs are skipped for bootstrap # The configs are skipped for bootstrap
# (1st iteration) to prevent newer flags from breaking bootstrap phase. # (1st iteration) to prevent newer flags from breaking bootstrap phase.
@ -307,8 +308,9 @@ proc boot(args: string) =
if version.startsWith "Nim Compiler Version 0.19.0": if version.startsWith "Nim Compiler Version 0.19.0":
extraOption.add " -d:nimBoostrapCsources0_19_0" extraOption.add " -d:nimBoostrapCsources0_19_0"
# remove this when csources get updated # remove this when csources get updated
exec i.thVersion & " $# $# $# --nimcache:$# compiler" / "nim.nim" %
[bootOptions, extraOption, args, smartNimcache] exec "$# $# $# $# --nimcache:$# compiler" / "nim.nim" %
[nimi, bootOptions, extraOption, 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!"