aboutsummaryrefslogtreecommitdiff
path: root/src/boot
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
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')
-rw-r--r--src/boot/driver/main.ml7
-rw-r--r--src/boot/me/dwarf.ml2
2 files changed, 8 insertions, 1 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)
;;
diff --git a/src/boot/me/dwarf.ml b/src/boot/me/dwarf.ml
index 5fd8638f..a568db41 100644
--- a/src/boot/me/dwarf.ml
+++ b/src/boot/me/dwarf.ml
@@ -2238,7 +2238,7 @@ let dwarf_visitor
(SEQ [|
uleb abbrev_code;
(* DW_AT_producer: DW_FORM_string *)
- ZSTRING "Rustboot pre-release";
+ ZSTRING ("Rustboot " ^ Version.version);
(* DW_AT_language: DW_FORM_data4 *)
WORD (word_ty_mach, IMM 0x2L); (* DW_LANG_C *)
(* DW_AT_name: DW_FORM_string *)