summary refs log tree commit diff stats
path: root/compiler/main.nim
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-12-21 03:29:45 -0800
committerAndreas Rumpf <rumpf_a@web.de>2018-12-21 12:29:45 +0100
commit52e36a19a902edcc533c0e0ffd0eff8c83158fef (patch)
treecaebbfce56a81d0d76be5516708a3516d237c57d /compiler/main.nim
parent23448a96cca021d0fecd355e9d679fbb11b67102 (diff)
downloadNim-52e36a19a902edcc533c0e0ffd0eff8c83158fef.tar.gz
fix #9933 (#10067)
Diffstat (limited to 'compiler/main.nim')
-rw-r--r--compiler/main.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/main.nim b/compiler/main.nim
index 4e28ed483..2b2907794 100644
--- a/compiler/main.nim
+++ b/compiler/main.nim
@@ -76,6 +76,8 @@ proc commandCompileToC(graph: ModuleGraph) =
   registerPass(graph, cgenPass)
 
   compileProject(graph)
+  if graph.config.errorCounter > 0:
+    return # issue #9933
   cgenWriteModules(graph.backend, conf)
   if conf.cmd != cmdRun:
     let proj = changeFileExt(conf.projectFull, "")