summary refs log tree commit diff stats
path: root/compiler/cgen.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/cgen.nim')
-rw-r--r--compiler/cgen.nim5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
index b7849f074..d7f8c4e22 100644
--- a/compiler/cgen.nim
+++ b/compiler/cgen.nim
@@ -1254,7 +1254,7 @@ proc updateCachedModule(m: BModule) =
   let cfile = getCFile(m)
   let cfilenoext = changeFileExt(cfile, "")
   
-  if mergeRequired(m):
+  if mergeRequired(m) and sfMainModule notin m.module.flags:
     mergeFiles(cfile, m)
     genInitCode(m)
     finishTypeDescriptions(m)
@@ -1264,8 +1264,7 @@ proc updateCachedModule(m: BModule) =
 
   addFileToLink(cfilenoext)
 
-proc cgenCaasUpdate* =
-  # XXX(zah): clean-up the fromCache mess
+proc updateCachedModules* =
   for m in cgenModules():
     if m.fromCache: m.updateCachedModule