about summary refs log tree commit diff
path: root/src/boot/driver
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2010-07-03 00:27:33 -0700
committerGraydon Hoare <graydon@mozilla.com>2010-07-03 00:27:33 -0700
commitdf0fa603d091eb92e9ce7d2be969ae78a11057e2 (patch)
tree6ce0b17ca8366bd1fca560b4ca33f7dffb0a16cb /src/boot/driver
parentcf19c5132a074195b61c3a09b9b61f99840744df (diff)
downloadrust-df0fa603d091eb92e9ce7d2be969ae78a11057e2.tar.gz
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 5655604d3f2..9cb068efe06 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)
 ;;