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.standalone b/Makefile.standalone
index 56fd8a4..f3a5d87 100644
--- a/Makefile.standalone
+++ b/Makefile.standalone
@@ -111,7 +111,9 @@
endif
BASE_CXX_DEFINES += -DPNACL_LLVM
-BASE_CXX_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)
+BASE_CXX_DEFINES += -DSUBZERO_REVISION=$(SZ_COMMIT_COUNT)_$(SZ_GIT_HASH)
CXX_DEFINES := $(BASE_CXX_DEFINES) -DPNACL_BROWSER_TRANSLATOR=0