veyron2,veyron/runtimes/google/rt: introduce binary metadata
This provides a way to query any vanadium binary about its build metadata (using
the --help flag), and also prints the information at the top of the log files.
The Go version comes from the runtime package, and the build metadata is filled
in with ldflags, e.g.
v23 go install -ldflags "-X v.io/core/veyron/lib/flags/buildinfo.vanadiumBuildInfo $USER`date -u +.%Y%m%d.%H%M%S`" ./veyron/services/mgmt/binary/binaryd
$> binaryd --help
{"GoVersion":"go1.4","BuildInfo":"caprita.20150220.193152"}
Usage of binaryd:
....
$> binaryd
I0220 11:32:14.855011 12933 runtime.go:72] Binary info: {"GoVersion":"go1.4","BuildInfo":"caprita.20150220.193152"}
I0220 11:32:14.881716 12933 main.go:58] Binary repository rooted at /tmp/veyron_binary_repository473207613
I0220 11:32:14.882220 12933 main.go:71] Binary repository HTTP server at: "172.22.140.20:36030"
...
The next step would be to get v23 to fill in the metadata in ldflags
automatically at build time.
Change-Id: I5de26bc697e620d11b10ae7d7a93c05e7fe3a21f
4 files changed