From 187aacedcf9c166ff55a7548c5c5725e41e4d094 Mon Sep 17 00:00:00 2001 From: xleroy Date: Wed, 5 Feb 2014 14:08:10 +0000 Subject: Recognize .i and .p source files as C sources not to be preprocessed. Add CompCert version number and command line as comments in generated asm. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2407 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- backend/PrintAnnot.ml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'backend') diff --git a/backend/PrintAnnot.ml b/backend/PrintAnnot.ml index 1ebb51f..d24635a 100644 --- a/backend/PrintAnnot.ml +++ b/backend/PrintAnnot.ml @@ -74,3 +74,14 @@ let print_annot_stmt print_preg sp_reg_name oc txt tmpl args = let print_annot_val print_preg oc txt args = print_annot_text print_preg "" oc txt (List.map (fun r -> Reg r) args) + +(* 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 Configuration.version; + fprintf oc "%s Command line:" comment; + for i = 1 to Array.length Sys.argv - 1 do + fprintf oc " %s" Sys.argv.(i) + done; + fprintf oc "\n" + -- cgit v1.2.3