diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-09-30 14:38:58 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-09-30 14:38:58 +0200 |
commit | a4edc066cf42af9e86643d9ddfe815c42798d4c7 (patch) | |
tree | 66db57f9c4b8434b7e75184b19a41d072d96e826 /backend | |
parent | e443d76ad1ee0182353404317ab45c26227a59ea (diff) | |
download | compcert-kvx-a4edc066cf42af9e86643d9ddfe815c42798d4c7.tar.gz compcert-kvx-a4edc066cf42af9e86643d9ddfe815c42798d4c7.zip |
Add the version string to the printed asm.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/PrintAsmaux.ml | 7 |
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) |