From 73e5e2f8bade2d8b2b1ecae958fe12d0b24591ef Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Thu, 27 Nov 2014 10:50:51 +0100 Subject: Embed Git commit id into `ghc --info` output Since we switched to a Git submodule based GHC Git repo, `ghc.git`'s commit id uniquely identifies the state of the GHC source-tree. So having that information embedded into the `ghc` executable provides valuable information to track accurately (especially when created by buildbots) from which source-tree-state a given `ghc` snapshot (distribution) was generated. So this commit adds a new field `"Project Git commit id"` to the `ghc --info` meta-data containing the `./configure`-time Git commit id as reported by `git rev-parse HEAD`. This field can also be queried with `ghc --print-project-git-commit-id`. For source distributions, the file `GIT_COMMIT_ID` is created (with some sanity checking to detect stale commit ids, as that would render this information rather useless) Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D528 --- ghc/Main.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'ghc/Main.hs') diff --git a/ghc/Main.hs b/ghc/Main.hs index d70691431e..f0539df6cd 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -541,6 +541,7 @@ mode_flags = ] ++ [ defFlag k' (PassFlag (setMode (printSetting k))) | k <- ["Project version", + "Project Git commit id", "Booter version", "Stage", "Build platform", -- cgit v1.2.1