better error message when C compilation fails

This commit is contained in:
Araq 2013-03-19 08:43:45 +01:00
commit b7d1901747
3 changed files with 10 additions and 2 deletions

View file

@ -1,7 +1,7 @@
# #
# #
# The Nimrod Compiler # The Nimrod Compiler
# (c) Copyright 2012 Andreas Rumpf # (c) Copyright 2013 Andreas Rumpf
# #
# See the file "copying.txt", included in this # See the file "copying.txt", included in this
# distribution, for details about the copyright. # distribution, for details about the copyright.
@ -573,7 +573,12 @@ proc CallCCompiler*(projectfile: string) =
else: else:
res = execProcesses(cmds, {poUseShell, poParentStreams}, res = execProcesses(cmds, {poUseShell, poParentStreams},
gNumberOfProcessors) 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: if optNoLinking notin gGlobalOptions:
# call the linker: # call the linker:
var it = PStrEntry(toLink.head) var it = PStrEntry(toLink.head)

View file

@ -132,6 +132,7 @@ proc exec(cpu: PCPU) =
let opcode = cpu.mem.readByte(cpu.r.pc) let opcode = cpu.mem.readByte(cpu.r.pc)
#echo("OPCODE: 0x", toHex(opcode, 2)) #echo("OPCODE: 0x", toHex(opcode, 2))
cpu.r.pc.inc() cpu.r.pc.inc()
# PROBLEM: 0x7B is part of some range later but the compiler does not care!
case opcode case opcode
of 0x06: of 0x06:
# LD B, n # LD B, n

View file

@ -13,6 +13,7 @@ version 0.9.2
- acyclic vs prunable; introduce GC hints - acyclic vs prunable; introduce GC hints
- CGEN: ``restrict`` pragma + backend support; computed goto support - CGEN: ``restrict`` pragma + backend support; computed goto support
- document NimMain and check whether it works for threading - document NimMain and check whether it works for threading
- implement ``system.locals`` magic iterator
Bugs Bugs
@ -31,6 +32,7 @@ Bugs
in c++ mode) in c++ mode)
- bootstrapping does not work in C++ mode - bootstrapping does not work in C++ mode
- case statement exhaustiveness checking is still wrong - case statement exhaustiveness checking is still wrong
- the new m&s GC is still buggy
version 0.9.4 version 0.9.4