From 4a2fed6f5e11799fabcb6fb38153e09af6f10d64 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 17 Jan 2018 10:24:59 +0100 Subject: Added missing help and common options. Clightgen also now has command line flags to control warnings as well as some other general options. --- exportclight/Clightgen.ml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'exportclight') diff --git a/exportclight/Clightgen.ml b/exportclight/Clightgen.ml index 432346a5..f927e5ab 100644 --- a/exportclight/Clightgen.ml +++ b/exportclight/Clightgen.ml @@ -97,6 +97,7 @@ let usage_string = {|Usage: clightgen [options] Recognized source files: .c C source file + .i or .p C source file that should not be preprocessed Processing options: -normalize Normalize the generated Clight code w.r.t. loads in expressions -E Preprocess only, send result to standard output @@ -110,7 +111,9 @@ prepro_help ^ results or function arguments [off] -fstruct-return Like -fstruct-passing (deprecated) -fvararg-calls Emulate calls to variable-argument functions [on] + -funprototyped Support calls to old-style functions without prototypes [on] -fpacked-structs Emulate packed structs [off] + -finline-asm Support inline 'asm' statements [off] -fall Activate all language support options above -fnone Turn off all language support options above Tracing options: @@ -118,8 +121,14 @@ Tracing options: -dc Save generated Compcert C in .compcert.c -dclight Save generated Clight in .light.c General options: + -stdlib Set the path of the Compcert run-time library -v Print external commands before invoking them -|} + -version Print the version string and exit + -target Generate code for the given target + -conf Read configuration from file + @ Read command line options from +|} ^ + Cerrors.warning_help let print_usage_and_exit () = printf "%s" usage_string; exit 0 @@ -176,7 +185,12 @@ let cmdline_actions = (* General options *) Exact "-v", Set option_v; Exact "-stdlib", String(fun s -> stdlib_path := s); + Exact "-stdlib", String(fun s -> stdlib_path := s); + Exact "-conf", Ignore; (* Ignore option since it is already handled *) + Exact "-target", Ignore; (* Ignore option since it is already handled *) ] +(* Diagnostic options *) + @ Cerrors.warning_options (* -f options: come in -f and -fno- variants *) (* Language support options *) @ f_opt "longdouble" option_flongdouble -- cgit