koch --nim:pathto/nim boot and koch boot --hint:cc:off now work (#13516)

* `koch boot --hint:cc:off` now works

* `koch --nim:pathto/nim boot` now works; code cleanup
This commit is contained in:
Timothee Cour 2020-03-10 16:31:34 -07:00 • committed by GitHub
commit e64f1c7ee4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 28 deletions

View file

@ -265,15 +265,12 @@ when false:
proc findStartNim: string =
# we try several things before giving up:
# * nimExe
# * bin/nim
# * $PATH/nim
# If these fail, we try to build nim with the "build.(sh|bat)" script.
var nim = "nim".exe
result = "bin" / nim
if existsFile(result): return
for dir in split(getEnv("PATH"), PathSep):
if existsFile(dir / nim): return dir / nim
let (nim, ok) = findNimImpl()
if ok: return nim
when defined(Posix):
const buildScript = "build.sh"
if existsFile(buildScript):