fixes #10030 bootstrap is insulated from user config (#10244)

This commit is contained in:
Timothee Cour
2019-01-10 08:49:57 -08:00
committed by Andreas Rumpf
parent 8e600b78ca
commit 0bb76dde54
2 changed files with 12 additions and 3 deletions

View File

@@ -26,6 +26,10 @@ build_nim_csources(){
[ -f $nim_csources ] || echo_run build_nim_csources
echo_run bin/nim c koch # Note: if fails, may need to `cd csources && git pull`
# Note: if fails, may need to `cd csources && git pull`
# Note: --skipUserCfg is to prevent newer flags from
# breaking bootstrap phase
echo_run bin/nim c --skipUserCfg koch
echo_run ./koch boot -d:release
echo_run ./koch tools # Compile Nimble and other tools.

View File

@@ -285,8 +285,13 @@ proc boot(args: string) =
copyExe(findStartNim(), 0.thVersion)
for i in 0..2:
echo "iteration: ", i+1
exec i.thVersion & " $# $# --nimcache:$# compiler" / "nim.nim" % [bootOptions, args,
smartNimcache]
let extraOption = if i == 0:
"--skipUserCfg"
# forward compatibility: for bootstrap (1st iteration), avoid user flags
# that could break things, see #10030
else: ""
exec i.thVersion & " $# $# $# --nimcache:$# compiler" / "nim.nim" %
[bootOptions, extraOption, args, smartNimcache]
if sameFileContent(output, i.thVersion):
copyExe(output, finalDest)
echo "executables are equal: SUCCESS!"