summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/commands.nim22
-rw-r--r--compiler/options.nim2
-rw-r--r--lib/system/excpt.nim2
3 files changed, 24 insertions, 2 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index 8339219ed..366019c19 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -50,11 +50,33 @@ proc writeAdvancedUsage(pass: TCmdLinePass) =
                                  CPU[platform.hostCPU].name]) & AdvancedUsage)
     quit(0)
 
+template bootSwitch(name, expr, userString: expr): expr =
+  # Helper to build boot constants, for debugging you can 'echo' the else part.
+  const name = if expr: " " & userString else: ""
+
+bootSwitch(usedAvoidTimeMachine, noTimeMachine, "-d:avoidTimeMachine")
+bootSwitch(usedRelease, defined(release), "-d:release")
+bootSwitch(usedTinyC, hasTinyCBackend, "-d:tinyc")
+bootSwitch(usedGnuReadline, defined(useGnuReadline), "-d:useGnuReadline")
+bootSwitch(usedNativeStacktrace,
+  defined(nativeStackTrace) and nativeStackTraceSupported,
+  "-d:nativeStackTrace")
+bootSwitch(usedNoCaas, defined(noCaas), "-d:noCaas")
+bootSwitch(usedFFI, hasFFI, "-d:useFFI")
+bootSwitch(usedBoehm, defined(boehmgc), "--gc:boehm")
+bootSwitch(usedMarkAndSweep, defined(gcmarkandsweep), "--gc:markAndSweep")
+bootSwitch(usedGenerational, defined(gcgenerational), "--gc:generational")
+bootSwitch(usedNoGC, defined(nogc), "--gc:none")
+
+
 proc writeVersionInfo(pass: TCmdLinePass) = 
   if pass == passCmd1:
     msgWriteln(`%`(HelpMessage, [VersionAsString, 
                                  platform.OS[platform.hostOS].name, 
                                  CPU[platform.hostCPU].name]))
+    msgWriteln("active boot switches:" & usedRelease & usedAvoidTimeMachine &
+      usedTinyC & usedGnuReadline & usedNativeStacktrace & usedNoCaas &
+      usedFFI & usedBoehm & usedMarkAndSweep & usedGenerational & usedNoGC)
     quit(0)
 
 var
diff --git a/compiler/options.nim b/compiler/options.nim
index f05354666..02719cacc 100644
--- a/compiler/options.nim
+++ b/compiler/options.nim
@@ -16,7 +16,7 @@ const
   hasFFI* = defined(useFFI)
   newScopeForIf* = true
   useCaas* = not defined(noCaas)
-  noTimeMachine = defined(avoidTimeMachine) and defined(macosx)
+  noTimeMachine* = defined(avoidTimeMachine) and defined(macosx)
 
 type                          # please make sure we have under 32 options
                               # (improves code efficiency a lot!)
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index 612a9e729..e11a30e9b 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -71,7 +71,7 @@ proc popCurrentException {.compilerRtl, inl.} =
 
 # some platforms have native support for stack traces:
 const
-  nativeStackTraceSupported = (defined(macosx) or defined(linux)) and 
+  nativeStackTraceSupported* = (defined(macosx) or defined(linux)) and
                               not nimrodStackTrace
   hasSomeStackTrace = nimrodStackTrace or 
     defined(nativeStackTrace) and nativeStackTraceSupported
le='author Araq <rumpf_a@web.de> 2012-04-21 03:19:43 +0200 committer Araq <rumpf_a@web.de> 2012-04-21 03:19:43 +0200 GC with realtime support' href='/ahoang/Nim/commit/lib/system/timers.nim?h=devel&id=4aba7421f57d0f653ef928f012982957404416f9'>4aba7421f ^
2ca90a20a ^
4aba7421f ^


43bddf62d ^

4aba7421f ^



2ca90a20a ^
4aba7421f ^

2ca90a20a ^

43bddf62d ^
2ca90a20a ^
083d4f470 ^
43bddf62d ^
2ca90a20a ^
359a4b5fa ^
4aba7421f ^


2ca90a20a ^
4aba7421f ^
43bddf62d ^
4aba7421f ^
43bddf62d ^

4aba7421f ^

2ca90a20a ^
4aba7421f ^
2ca90a20a ^
4aba7421f ^

2ca90a20a ^

4aba7421f ^
2ca90a20a ^
4aba7421f ^
2ca90a20a ^
4aba7421f ^

43bddf62d ^
5f6f444d5 ^




8d7a45f20 ^
4aba7421f ^
43bddf62d ^
4aba7421f ^
8d7a45f20 ^

3f6168b33 ^
2ca90a20a ^
4aba7421f ^

2ca90a20a ^

4aba7421f ^
43bddf62d ^
4aba7421f ^

2ca90a20a ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99