aboutsummaryrefslogtreecommitdiffstats
path: root/backend/PrintAsmaux.ml
diff options
context:
space:
mode:
Diffstat (limited to 'backend/PrintAsmaux.ml')
-rw-r--r--backend/PrintAsmaux.ml7
1 files changed, 6 insertions, 1 deletions
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)