diff options
author | Araq <rumpf_a@web.de> | 2015-02-05 12:23:12 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-02-05 12:23:27 +0100 |
commit | b44ee119c83923fb8c8d6c5671952f710b5425a5 (patch) | |
tree | 67d66e37cd4a29b8b382f669e700773afc624367 /compiler | |
parent | c795a469bcc70f912363f1639a323465e5176f5b (diff) | |
download | Nim-b44ee119c83923fb8c8d6c5671952f710b5425a5.tar.gz |
list CC executions properly again for --parallelBuild:1
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/extccomp.nim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index bc888315f..8e40cca39 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -428,13 +428,17 @@ proc addFileToLink*(filename: string) = prependStr(toLink, filename) # BUGFIX: was ``appendStr`` -proc execExternalProgram*(cmd: string, prettyCmd = "") = +proc execWithEcho(cmd: string, prettyCmd = ""): int = if optListCmd in gGlobalOptions or gVerbosity > 0: if prettyCmd != "": msgWriteln(prettyCmd) else: msgWriteln(cmd) - if execCmd(cmd) != 0: rawMessage(errExecutionOfProgramFailed, "") + result = execCmd(cmd) + +proc execExternalProgram*(cmd: string, prettyCmd = "") = + if execWithEcho(cmd, prettyCmd) != 0: + rawMessage(errExecutionOfProgramFailed, "") proc generateScript(projectFile: string, script: PRope) = let (dir, name, ext) = splitFile(projectFile) @@ -622,7 +626,7 @@ proc callCCompiler*(projectfile: string) = if gNumberOfProcessors == 0: gNumberOfProcessors = countProcessors() var res = 0 if gNumberOfProcessors <= 1: - for i in countup(0, high(cmds)): res = max(execCmd(cmds[i]), res) + for i in countup(0, high(cmds)): res = max(execWithEcho(cmds[i]), res) elif optListCmd in gGlobalOptions or gVerbosity > 1: res = execProcesses(cmds, {poEchoCmd, poUseShell, poParentStreams}, gNumberOfProcessors) |