summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-07-18 00:02:53 +0200
committerAraq <rumpf_a@web.de>2012-07-18 00:02:53 +0200
commit83deb233eec4b80b37146024df64a11a437da386 (patch)
treed72289a76633724ed2bc1486faa42709a9730941 /compiler
parent832da8a303793ac23a662dd76ff93caa2d5eb764 (diff)
downloadNim-83deb233eec4b80b37146024df64a11a437da386.tar.gz
attempt to fix DLL generation
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/cgen.nim11
-rwxr-xr-xcompiler/nimrod.cfg8
2 files changed, 7 insertions, 12 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
index 2c2230be9..c7bfced73 100755
--- a/compiler/cgen.nim
+++ b/compiler/cgen.nim
@@ -818,11 +818,11 @@ proc getFileHeader(cfilenoext: string): PRope =
 
 proc genMainProc(m: BModule) = 
   const 
-    CommonMainBody = 
-        "$1" &
+    CommonMainBody =
         "\tnim__datInit();$n" &
-        "\tsystemInit();$n" & 
-        "$2" & 
+        "\tsystemInit();$n" &
+        "$1" &
+        "$2" &
         "$3"
     PosixNimMain = 
         "int cmdCount;$n" & 
@@ -873,7 +873,8 @@ proc genMainProc(m: BModule) =
     otherMain = PosixCMain
   if gBreakpoints != nil: discard cgsym(m, "dbgRegisterBreakpoint")
   
-  let initStackBottomCall = if emulatedThreadVars(): "".toRope
+  let initStackBottomCall = if emulatedThreadVars() or
+                              platform.targetOS == osStandalone: "".toRope
                             else: ropecg(m, "\t#initStackBottom();$n")
   inc(m.labels)
   appcg(m, m.s[cfsProcs], nimMain, [initStackBottomCall,
diff --git a/compiler/nimrod.cfg b/compiler/nimrod.cfg
index f47143527..42a5ed5f5 100755
--- a/compiler/nimrod.cfg
+++ b/compiler/nimrod.cfg
@@ -6,10 +6,4 @@ path="$projectPath/.."
 
 path="$nimrod/packages/docutils"
 
-@if llvm_gcc or gcc:
-  # GCC, LLVM and Visual C++ have a problem to optimize some modules.
-  # This is really strange.
-  # cgen.speed = "-O0"
-@elif vcc:
-  # cgen.speed = ""
-@end
+--define:booting