summary refs log tree commit diff stats
diff options
context:
space:
mode:
authordef <dennis@felsin9.de>2015-03-28 15:07:55 +0100
committerdef <dennis@felsin9.de>2015-03-28 15:07:55 +0100
commit07351d5f37f9ff5fd78dd15fb5c24fd7d0a15eea (patch)
treeafc52639af5d0b40e77749cec4cc00ad003f20d5
parent165619552a7ad0fa4f594963ee0441dd711edfd4 (diff)
downloadNim-07351d5f37f9ff5fd78dd15fb5c24fd7d0a15eea.tar.gz
Initialize c compiler variables later ...
... so that symbols such as "cpp" are defined

Fixes #1460
-rw-r--r--compiler/cgen.nim2
-rw-r--r--compiler/main.nim1
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
index 01db97e73..a31f6b5e4 100644
--- a/compiler/cgen.nim
+++ b/compiler/cgen.nim
@@ -486,7 +486,7 @@ proc lenField(p: BProc): PRope =
 include ccgcalls, "ccgstmts.nim", "ccgexprs.nim"
 
 # ----------------------------- dynamic library handling -----------------
-# We don't finalize dynamic libs as this does the OS for us.
+# We don't finalize dynamic libs as the OS does this for us.
 
 proc isGetProcAddr(lib: PLib): bool =
   let n = lib.path
diff --git a/compiler/main.nim b/compiler/main.nim
index 363327e40..0c80c19b7 100644
--- a/compiler/main.nim
+++ b/compiler/main.nim
@@ -54,6 +54,7 @@ proc commandDoc2 =
   finishDoc2Pass(gProjectName)
 
 proc commandCompileToC =
+  extccomp.initVars()
   semanticPasses()
   registerPass(cgenPass)
   rodPass()