aboutsummaryrefslogtreecommitdiffstats
path: root/exportclight
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2018-01-17 10:24:59 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2018-01-17 10:24:59 +0100
commit4a2fed6f5e11799fabcb6fb38153e09af6f10d64 (patch)
tree605f20b2d3dc0039d10865c0e92a311b81c5f5bb /exportclight
parent879ba4632717690cb3fbf0010b038fe6dc3c231e (diff)
downloadcompcert-kvx-4a2fed6f5e11799fabcb6fb38153e09af6f10d64.tar.gz
compcert-kvx-4a2fed6f5e11799fabcb6fb38153e09af6f10d64.zip
Added missing help and common options.
Clightgen also now has command line flags to control warnings as well as some other general options.
Diffstat (limited to 'exportclight')
-rw-r--r--exportclight/Clightgen.ml16
1 files changed, 15 insertions, 1 deletions
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] <source files>
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 <file>.compcert.c
-dclight Save generated Clight in <file>.light.c
General options:
+ -stdlib <dir> Set the path of the Compcert run-time library
-v Print external commands before invoking them
-|}
+ -version Print the version string and exit
+ -target <value> Generate code for the given target
+ -conf <file> Read configuration from file
+ @<file> Read command line options from <file>
+|} ^
+ 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