diff options
author | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2014-04-22 20:28:59 +0200 |
---|---|---|
committer | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2014-04-22 20:28:59 +0200 |
commit | 7e2e5efe6f339f0d3ee30057aee16873a0e97383 (patch) | |
tree | f869b68a6723670f31de78b709af6d7916655e87 /compiler | |
parent | 49ce36a6573afdc638b825ffb704598b635a01c8 (diff) | |
download | Nim-7e2e5efe6f339f0d3ee30057aee16873a0e97383.tar.gz |
Adds git hash to compiler's version switch. Refs #1119.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/commands.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index 366019c19..e920cc897 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -74,6 +74,11 @@ proc writeVersionInfo(pass: TCmdLinePass) = msgWriteln(`%`(HelpMessage, [VersionAsString, platform.OS[platform.hostOS].name, CPU[platform.hostCPU].name])) + + const gitHash = gorge("git log -n 1 --format=%H") + if gitHash.strip.len == 40: + msgWriteln("git hash: " & gitHash) + msgWriteln("active boot switches:" & usedRelease & usedAvoidTimeMachine & usedTinyC & usedGnuReadline & usedNativeStacktrace & usedNoCaas & usedFFI & usedBoehm & usedMarkAndSweep & usedGenerational & usedNoGC) |