Version switch displays options used during koch boot
This commit is contained in:
parent
13b941d8ee
commit
03ffc344e1
3 changed files with 24 additions and 2 deletions
|
|
@ -50,11 +50,33 @@ proc writeAdvancedUsage(pass: TCmdLinePass) =
|
||||||
CPU[platform.hostCPU].name]) & AdvancedUsage)
|
CPU[platform.hostCPU].name]) & AdvancedUsage)
|
||||||
quit(0)
|
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) =
|
proc writeVersionInfo(pass: TCmdLinePass) =
|
||||||
if pass == passCmd1:
|
if pass == passCmd1:
|
||||||
msgWriteln(`%`(HelpMessage, [VersionAsString,
|
msgWriteln(`%`(HelpMessage, [VersionAsString,
|
||||||
platform.OS[platform.hostOS].name,
|
platform.OS[platform.hostOS].name,
|
||||||
CPU[platform.hostCPU].name]))
|
CPU[platform.hostCPU].name]))
|
||||||
|
msgWriteln("active boot switches:" & usedRelease & usedAvoidTimeMachine &
|
||||||
|
usedTinyC & usedGnuReadline & usedNativeStacktrace & usedNoCaas &
|
||||||
|
usedFFI & usedBoehm & usedMarkAndSweep & usedGenerational & usedNoGC)
|
||||||
quit(0)
|
quit(0)
|
||||||
|
|
||||||
var
|
var
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const
|
||||||
hasFFI* = defined(useFFI)
|
hasFFI* = defined(useFFI)
|
||||||
newScopeForIf* = true
|
newScopeForIf* = true
|
||||||
useCaas* = not defined(noCaas)
|
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
|
type # please make sure we have under 32 options
|
||||||
# (improves code efficiency a lot!)
|
# (improves code efficiency a lot!)
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ proc popCurrentException {.compilerRtl, inl.} =
|
||||||
|
|
||||||
# some platforms have native support for stack traces:
|
# some platforms have native support for stack traces:
|
||||||
const
|
const
|
||||||
nativeStackTraceSupported = (defined(macosx) or defined(linux)) and
|
nativeStackTraceSupported* = (defined(macosx) or defined(linux)) and
|
||||||
not nimrodStackTrace
|
not nimrodStackTrace
|
||||||
hasSomeStackTrace = nimrodStackTrace or
|
hasSomeStackTrace = nimrodStackTrace or
|
||||||
defined(nativeStackTrace) and nativeStackTraceSupported
|
defined(nativeStackTrace) and nativeStackTraceSupported
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue