From c4ff6732b687b458e26aae3041463abcd90495c1 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Thu, 12 Mar 2020 03:00:29 -0700 Subject: [PATCH] fix #13633 fix koch boot crashing regression --- compiler/extccomp.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 34552e6f3bbf1..8ebba6d9d5d61 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -998,10 +998,11 @@ proc writeJsonBuildInstructions*(conf: ConfigRef) = f.write escapeJson(x) proc cfiles(conf: ConfigRef; f: File; buf: var string; clist: CfileList, isExternal: bool) = - for i, it in clist: + var first = true + for it in clist: if CfileFlag.Cached in it.flags: continue let compileCmd = getCompileCFileCmd(conf, it) - if i > 0: lit ",\L" + if first: first = false else: lit ",\L" lit "[" str it.cname.string lit ", " @@ -1137,7 +1138,7 @@ proc runJsonBuildInstructions*(conf: ConfigRef; projectfile: AbsoluteFile) = except: let e = getCurrentException() - quit "\ncaught exception:n" & e.msg & "\nstacktrace:\n" & e.getStackTrace() & + quit "\ncaught exception:\n" & e.msg & "\nstacktrace:\n" & e.getStackTrace() & "error evaluating JSON file: " & jsonFile.string proc genMappingFiles(conf: ConfigRef; list: CfileList): Rope =