1 (***********************************************************************)
5 (* Damien Doligez, projet Para, INRIA Rocquencourt *)
7 (* Copyright 1998 Institut National de Recherche en Informatique et *)
8 (* en Automatique. All rights reserved. This file is distributed *)
9 (* under the terms of the Q Public License version 1.0. *)
11 (***********************************************************************)
13 (* $Id: main_args.ml 8232 2007-05-16 08:21:41Z doligez $ *)
15 module Make_options (F :
18 val _annot : unit -> unit
20 val _cc : string -> unit
21 val _cclib : string -> unit
22 val _ccopt : string -> unit
23 val _config : unit -> unit
24 val _custom : unit -> unit
25 val _dllib : string -> unit
26 val _dllpath : string -> unit
29 val _I : string -> unit
30 val _impl : string -> unit
31 val _intf : string -> unit
32 val _intf_suffix : string -> unit
33 val _labels : unit -> unit
34 val _linkall : unit -> unit
35 val _make_runtime : unit -> unit
36 val _noassert : unit -> unit
37 val _noautolink : unit -> unit
38 val _nolabels : unit -> unit
39 val _nostdlib : unit -> unit
40 val _o : string -> unit
41 val _output_obj : unit -> unit
42 val _pack : unit -> unit
43 val _pp : string -> unit
44 val _principal : unit -> unit
45 val _rectypes : unit -> unit
46 val _thread : unit -> unit
47 val _vmthread : unit -> unit
48 val _unsafe : unit -> unit
49 val _use_prims : string -> unit
50 val _use_runtime : string -> unit
52 val _version : unit -> unit
53 val _verbose : unit -> unit
54 val _w : string -> unit
55 val _warn_error : string -> unit
56 val _where : unit -> unit
58 val _nopervasives : unit -> unit
59 val _dparsetree : unit -> unit
60 val _drawlambda : unit -> unit
61 val _dlambda : unit -> unit
62 val _dinstr : unit -> unit
63 val anonymous : string -> unit
67 "-a", Arg.Unit F._a, " Build a library";
68 "-annot", Arg.Unit F._annot, " Save information in <filename>.annot";
69 "-c", Arg.Unit F._c, " Compile only (do not link)";
70 "-cc", Arg.String F._cc,
71 "<command> Use <command> as the C compiler and linker";
72 "-cclib", Arg.String F._cclib, "<opt> Pass option <opt> to the C linker";
73 "-ccopt", Arg.String F._ccopt,
74 "<opt> Pass option <opt> to the C compiler and linker";
75 "-config", Arg.Unit F._config,
76 " print configuration values and exit";
77 "-custom", Arg.Unit F._custom, " Link in custom mode";
78 "-dllib", Arg.String F._dllib,
79 "<lib> Use the dynamically-loaded library <lib>";
80 "-dllpath", Arg.String F._dllpath,
81 "<dir> Add <dir> to the run-time search path for shared libraries";
82 "-dtypes", Arg.Unit F._annot, " (deprecated) same as -annot";
83 "-for-pack", Arg.String (fun s -> ()),
84 "<ident> Ignored (for compatibility with ocamlopt)";
85 "-g", Arg.Unit F._g, " Save debugging information";
86 "-i", Arg.Unit F._i, " Print inferred interface";
87 "-I", Arg.String F._I,
88 "<dir> Add <dir> to the list of include directories";
89 "-impl", Arg.String F._impl, "<file> Compile <file> as a .ml file";
90 "-intf", Arg.String F._intf, "<file> Compile <file> as a .mli file";
91 "-intf-suffix", Arg.String F._intf_suffix,
92 "<string> Suffix for interface files (default: .mli)";
93 "-intf_suffix", Arg.String F._intf_suffix,
94 "<string> (deprecated) same as -intf-suffix";
95 "-labels", Arg.Unit F._labels, " Use commuting label mode";
96 "-linkall", Arg.Unit F._linkall, " Link all modules, even unused ones";
97 "-make-runtime", Arg.Unit F._make_runtime,
98 " Build a runtime system with given C objects and libraries";
99 "-make_runtime", Arg.Unit F._make_runtime,
100 " (deprecated) same as -make-runtime";
101 "-modern", Arg.Unit F._labels, " (deprecated) same as -labels";
102 "-noassert", Arg.Unit F._noassert, " Don't compile assertion checks";
103 "-noautolink", Arg.Unit F._noautolink,
104 " Don't automatically link C libraries specified in .cma files";
105 "-nolabels", Arg.Unit F._nolabels, " Ignore non-optional labels in types";
106 "-nostdlib", Arg.Unit F._nostdlib,
107 " do not add default directory to the list of include directories";
108 "-o", Arg.String F._o, "<file> Set output file name to <file>";
109 "-output-obj", Arg.Unit F._output_obj,
110 " Output a C object file instead of an executable";
111 "-pack", Arg.Unit F._pack,
112 " Package the given .cmo files into one .cmo";
113 "-pp", Arg.String F._pp,
114 "<command> Pipe sources through preprocessor <command>";
115 "-principal", Arg.Unit F._principal,
116 " Check principality of type inference";
117 "-rectypes", Arg.Unit F._rectypes, " Allow arbitrary recursive types";
118 "-thread", Arg.Unit F._thread,
119 " Generate code that supports the system threads library";
120 "-unsafe", Arg.Unit F._unsafe,
121 " No bounds checking on array and string access";
122 "-use-runtime", Arg.String F._use_runtime,
123 "<file> Generate bytecode for the given runtime system";
124 "-use_runtime", Arg.String F._use_runtime,
125 "<file> (deprecated) same as -use-runtime";
127 " Print compiler version and location of standard library and exit";
128 "-version", Arg.Unit F._version, " Print compiler version and exit";
129 "-verbose", Arg.Unit F._verbose, " Print calls to external commands";
130 "-vmthread", Arg.Unit F._vmthread,
131 " Generate code that supports the threads library with VM-level\n\
133 "-w", Arg.String F._w,
134 "<flags> Enable or disable warnings according to <flags>:\n\
135 \032 C/c enable/disable suspicious comment\n\
136 \032 D/d enable/disable deprecated features\n\
137 \032 E/e enable/disable fragile match\n\
138 \032 F/f enable/disable partially applied function\n\
139 \032 L/l enable/disable labels omitted in application\n\
140 \032 M/m enable/disable overriden methods\n\
141 \032 P/p enable/disable partial match\n\
142 \032 S/s enable/disable non-unit statement\n\
143 \032 U/u enable/disable unused match case\n\
144 \032 V/v enable/disable overriden instance variables\n\
145 \032 Y/y enable/disable suspicious unused variables\n\
146 \032 Z/z enable/disable all other unused variables\n\
147 \032 X/x enable/disable all other warnings\n\
148 \032 A/a enable/disable all warnings\n\
149 \032 default setting is \"Aelz\"";
150 "-warn-error" , Arg.String F._warn_error,
151 "<flags> Treat the warnings of <flags> as errors, if they are\n\
152 \ enabled. See option -w for the list of flags.\n\
153 \ Default setting is \"a\" (warnings are not errors)";
154 "-where", Arg.Unit F._where,
155 " Print location of standard library and exit";
156 "-nopervasives", Arg.Unit F._nopervasives, " (undocumented)";
157 "-dparsetree", Arg.Unit F._dparsetree, " (undocumented)";
158 "-drawlambda", Arg.Unit F._drawlambda, " (undocumented)";
159 "-dlambda", Arg.Unit F._dlambda, " (undocumented)";
160 "-dinstr", Arg.Unit F._dinstr, " (undocumented)";
161 "-use-prims", Arg.String F._use_prims, "<file> (undocumented)";
163 "-", Arg.String F.anonymous,
164 "<file> Treat <file> as a file name (even if it starts with `-')";