diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2014-07-01 02:59:34 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2014-07-01 02:59:34 +0200 |
commit | b1c5dc1ef937f42ff10ef6256684448c79647775 (patch) | |
tree | 6702d187fdce45ab55d7c61c23a860ba9495511f | |
parent | 405cd7d1fbc92189e70763b8f22e888559214451 (diff) | |
parent | 7e2e5efe6f339f0d3ee30057aee16873a0e97383 (diff) | |
download | Nim-b1c5dc1ef937f42ff10ef6256684448c79647775.tar.gz |
Merge pull request #1249 from gradha/pr_shows_git_hash
Adds git hash to compiler's version switch. Refs #1119.
-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) |