Subzero: Include commit count in revision string.
Instead of the version string being like this:
Subzero_revision_efdf412032f7622a0663696896708d75b82e92f6
Make it more like this:
Subzero_revision_1089_efdf412032f7622a0663696896708d75b82e92f6
I.e., provide both git hash and commit count.
That way, it's easier to compare revision strings and determine which one is newer.
BUG= none
R=eholk@chromium.org
Review URL: https://codereview.chromium.org/2251153002 .
diff --git a/Makefile b/Makefile
index e49eec3..ca1d4e3 100644
--- a/Makefile
+++ b/Makefile
@@ -31,4 +31,6 @@
endif
CPP.Defines += -DPNACL_LLVM
-CPP.Defines += -DSUBZERO_REVISION=$(shell git rev-parse HEAD)
+SZ_COMMIT_COUNT := $(shell git rev-list --count HEAD)
+SZ_GIT_HASH := $(shell git rev-parse HEAD)
+CPP.Defines += -DSUBZERO_REVISION=$(SZ_COMMIT_COUNT)_$(SZ_GIT_HASH)