aboutsummaryrefslogtreecommitdiff
path: root/src/boot/driver
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-03 00:27:33 -0700
committerGraydon Hoare <[email protected]>2010-07-03 00:27:33 -0700
commitdf0fa603d091eb92e9ce7d2be969ae78a11057e2 (patch)
tree6ce0b17ca8366bd1fca560b4ca33f7dffb0a16cb /src/boot/driver
parentHey, what's a coding sprint without an uncovered register allocation bug? No ... (diff)
downloadrust-df0fa603d091eb92e9ce7d2be969ae78a11057e2.tar.xz
rust-df0fa603d091eb92e9ce7d2be969ae78a11057e2.zip
Add version-stamp machinery (and put "Draft + datestamp" into doc footer).
Diffstat (limited to 'src/boot/driver')
-rw-r--r--src/boot/driver/main.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/boot/driver/main.ml b/src/boot/driver/main.ml
index 5655604d..9cb068ef 100644
--- a/src/boot/driver/main.ml
+++ b/src/boot/driver/main.ml
@@ -118,6 +118,11 @@ let dump_meta (filename:filename) : unit =
exit 0
;;
+let print_version _ =
+ Printf.fprintf stdout "rustboot %s\n" Version.version;
+ exit 0;
+;;
+
let flag f opt desc =
(opt, Arg.Unit f, desc)
;;
@@ -206,6 +211,8 @@ let argspecs =
"report metadata from DWARF info in compiled file, then exit");
("-rdeps", Arg.Unit (fun _ -> sess.Session.sess_report_deps <- true),
"report dependencies of input, then exit");
+ ("-version", Arg.Unit (fun _ -> print_version()),
+ "print version information, then exit");
] @ (Glue.alt_argspecs sess)
;;