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:
parent
3b7b017798
commit
e64f1c7ee4
4 changed files with 34 additions and 28 deletions
9
koch.nim
9
koch.nim
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue