Skip to content

Commit

Permalink
Tiny tiny cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Clyybber committed Mar 11, 2020
1 parent 1c81087 commit f575692
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions compiler/extccomp.nim
Original file line number Diff line number Diff line change
Expand Up @@ -705,14 +705,14 @@ proc addExternalFileToCompile*(conf: ConfigRef; filename: AbsoluteFile) =
flags: {CfileFlag.External})
addExternalFileToCompile(conf, c)

proc displayProgressCC(conf: ConfigRef, path: string, compileCmd: string = ""): string =
proc displayProgressCC(conf: ConfigRef, path, compileCmd: string): string =
if conf.hasHint(hintCC):
if optListCmd in conf.globalOptions or conf.verbosity > 1:
MsgKindToStr[hintCC] % (demanglePackageName(path.splitFile.name) & ": " & compileCmd)
elif conf.verbosity == 1:
MsgKindToStr[hintCC] % demanglePackageName(path.splitFile.name)
else:
"" #TODO
""
else: ""

proc getLinkCmd(conf: ConfigRef; output: AbsoluteFile,
Expand Down Expand Up @@ -908,8 +908,8 @@ proc callCCompiler*(conf: ConfigRef) =
# generated
#var c = cCompiler
var script: Rope = nil
var cmds: TStringSeq = @[]
var prettyCmds: TStringSeq = @[]
var cmds: TStringSeq
var prettyCmds: TStringSeq
let prettyCb = proc (idx: int) = callbackPrettyCmd(prettyCmds[idx])

for idx, it in conf.toCompile:
Expand Down Expand Up @@ -1117,14 +1117,14 @@ proc runJsonBuildInstructions*(conf: ConfigRef; projectfile: AbsoluteFile) =
let data = json.parseFile(jsonFile.string)
let toCompile = data["compile"]
doAssert toCompile.kind == JArray
var cmds: TStringSeq = @[]
var prettyCmds: TStringSeq = @[]
var cmds: TStringSeq
var prettyCmds: TStringSeq
for c in toCompile:
doAssert c.kind == JArray
doAssert c.len >= 2

cmds.add(c[1].getStr)
prettyCmds.add displayProgressCC(conf, c[0].getStr)
prettyCmds.add displayProgressCC(conf, c[0].getStr, c[1].getStr)

let prettyCb = proc (idx: int) = callbackPrettyCmd(prettyCmds[idx])
execCmdsInParallel(conf, cmds, prettyCb)
Expand Down

0 comments on commit f575692

Please sign in to comment.