diff options
| author | Graydon Hoare <[email protected]> | 2010-07-03 00:27:33 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-03 00:27:33 -0700 |
| commit | df0fa603d091eb92e9ce7d2be969ae78a11057e2 (patch) | |
| tree | 6ce0b17ca8366bd1fca560b4ca33f7dffb0a16cb /src/boot/driver/main.ml | |
| parent | Hey, what's a coding sprint without an uncovered register allocation bug? No ... (diff) | |
| download | rust-df0fa603d091eb92e9ce7d2be969ae78a11057e2.tar.xz rust-df0fa603d091eb92e9ce7d2be969ae78a11057e2.zip | |
Add version-stamp machinery (and put "Draft + datestamp" into doc footer).
Diffstat (limited to 'src/boot/driver/main.ml')
| -rw-r--r-- | src/boot/driver/main.ml | 7 |
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) ;; |