@@ -27,8 +27,10 @@ when defined(amd64) and defined(windows) and defined(vcc):
2727when defined (i386) and defined (windows) and defined (vcc):
2828 {.link : " icons/koch-i386-windows-vcc.res" .}
2929
30- import
31- os, strutils, parseopt, osproc
30+ import std/ [os, strutils, parseopt, osproc]
31+ # Using `std/os` instead of `os` to fail early if config isn't set up properly.
32+ # If this fails with: `Error: cannot open file: std/os`, see
33+ # https://github.com/nim-lang/Nim/pull/14291 for explanation + how to fix.
3234
3335import tools / kochdocs
3436import tools / deps
@@ -318,9 +320,13 @@ proc boot(args: string) =
318320 let ret = execCmdEx (nimStart & " --version" )
319321 doAssert ret.exitCode == 0
320322 let version = ret.output.splitLines[0 ]
323+ # remove these when csources get updated
324+ template addLib () =
325+ extraOption.add " --lib:lib" # see https://github.com/nim-lang/Nim/pull/14291
321326 if version.startsWith " Nim Compiler Version 0.19.0" :
322327 extraOption.add " -d:nimBoostrapCsources0_19_0"
323- # remove this when csources get updated
328+ addLib ()
329+ elif version.startsWith " Nim Compiler Version 0.20.0" : addLib ()
324330
325331 # in order to use less memory, we split the build into two steps:
326332 # --compileOnly produces a $project.json file and does not run GCC/Clang.
0 commit comments