From a4edc066cf42af9e86643d9ddfe815c42798d4c7 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 30 Sep 2015 14:38:58 +0200 Subject: Add the version string to the printed asm. --- backend/PrintAsmaux.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'backend/PrintAsmaux.ml') diff --git a/backend/PrintAsmaux.ml b/backend/PrintAsmaux.ml index 1c3b47b5..c0ab3134 100644 --- a/backend/PrintAsmaux.ml +++ b/backend/PrintAsmaux.ml @@ -327,7 +327,12 @@ let print_inline_asm print_preg oc txt sg args res = (** Print CompCert version and command-line as asm comment *) let print_version_and_options oc comment = - fprintf oc "%s File generated by CompCert %s\n" comment Version.version; + let version_string = + if Version.buildnr <> "" && Version.tag <> "" then + sprintf "%s, Build: %s, Tag: %s\n" Version.version Version.buildnr Version.tag + else + Version.version in + fprintf oc "%s File generated by CompCert %s\n" comment version_string; fprintf oc "%s Command line:" comment; for i = 1 to Array.length Sys.argv - 1 do fprintf oc " %s" Sys.argv.(i) -- cgit