summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-03-19 08:43:45 +0100
committerAraq <rumpf_a@web.de>2013-03-19 08:43:45 +0100
commitb7d19017477445b545f9be0e7038985106784787 (patch)
tree1e553c48722a74b1d3d598071669b904de8c6675 /compiler
parent09fc94c4c2f79ef73c9ee6bee28bbc8f8880106f (diff)
downloadNim-b7d19017477445b545f9be0e7038985106784787.tar.gz
better error message when C compilation fails
Diffstat (limited to 'compiler')
-rw-r--r--compiler/extccomp.nim9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim
index c97f92f4e..c1a8e9bce 100644
--- a/compiler/extccomp.nim
+++ b/compiler/extccomp.nim
@@ -1,7 +1,7 @@
 #
 #
 #           The Nimrod Compiler
-#        (c) Copyright 2012 Andreas Rumpf
+#        (c) Copyright 2013 Andreas Rumpf
 #
 #    See the file "copying.txt", included in this
 #    distribution, for details about the copyright.
@@ -573,7 +573,12 @@ proc CallCCompiler*(projectfile: string) =
     else: 
       res = execProcesses(cmds, {poUseShell, poParentStreams}, 
                           gNumberOfProcessors)
-    if res != 0: rawMessage(errExecutionOfProgramFailed, [])
+    if res != 0:
+      if gNumberOfProcessors <= 1:
+        rawMessage(errExecutionOfProgramFailed, [])
+      else:
+        rawMessage(errGenerated, " execution of an external program failed; " &
+                   "rerun with --parallelBuild:1 to see the error message")
   if optNoLinking notin gGlobalOptions:
     # call the linker:
     var it = PStrEntry(toLink.head)