summaryrefslogtreecommitdiff
path: root/driver/main_args.ml
blob: bb72b79450f3677f997f73f052dcd7e326731d89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
(***********************************************************************)
(*                                                                     *)
(*                           Objective Caml                            *)
(*                                                                     *)
(*             Damien Doligez, projet Para, INRIA Rocquencourt         *)
(*                                                                     *)
(*  Copyright 1998 Institut National de Recherche en Informatique et   *)
(*  en Automatique.  All rights reserved.  This file is distributed    *)
(*  under the terms of the Q Public License version 1.0.               *)
(*                                                                     *)
(***********************************************************************)

(* $Id$ *)

module Make_options (F :
   sig
     val _a : unit -> unit
     val _annot : unit -> unit
     val _c : unit -> unit
     val _cc : string -> unit
     val _cclib : string -> unit
     val _ccopt : string -> unit
     val _config : unit -> unit
     val _custom : unit -> unit
     val _dllib : string -> unit
     val _dllpath : string -> unit
     val _g : unit -> unit
     val _i : unit -> unit
     val _I : string -> unit
     val _impl : string -> unit
     val _intf : string -> unit
     val _intf_suffix : string -> unit
     val _labels : unit -> unit
     val _linkall : unit -> unit
     val _make_runtime : unit -> unit
     val _noassert : unit -> unit
     val _noautolink : unit -> unit
     val _nolabels : unit -> unit
     val _nostdlib : unit -> unit
     val _o : string -> unit
     val _output_obj : unit -> unit
     val _pack : unit -> unit
     val _pp : string -> unit
     val _principal : unit -> unit
     val _rectypes : unit -> unit
     val _thread : unit -> unit
     val _vmthread : unit -> unit
     val _unsafe : unit -> unit
     val _use_prims : string -> unit
     val _use_runtime : string -> unit
     val _v : unit -> unit
     val _version : unit -> unit
     val _verbose : unit -> unit
     val _w : string -> unit
     val _warn_error : string -> unit
     val _where : unit -> unit

     val _nopervasives : unit -> unit
     val _dparsetree : unit -> unit
     val _drawlambda : unit -> unit
     val _dlambda : unit -> unit
     val _dinstr : unit -> unit
     val anonymous : string -> unit
   end) =
struct
  let list = [
    "-a", Arg.Unit F._a, " Build a library";
    "-annot", Arg.Unit F._annot, " Save information in <filename>.annot";
    "-c", Arg.Unit F._c, " Compile only (do not link)";
    "-cc", Arg.String F._cc,
           "<command>  Use <command> as the C compiler and linker";
    "-cclib", Arg.String F._cclib, "<opt>  Pass option <opt> to the C linker";
    "-ccopt", Arg.String F._ccopt,
           "<opt>  Pass option <opt> to the C compiler and linker";
    "-config", Arg.Unit F._config,
           " print configuration values and exit";
    "-custom", Arg.Unit F._custom, " Link in custom mode";
    "-dllib", Arg.String F._dllib,
           "<lib>  Use the dynamically-loaded library <lib>";
    "-dllpath", Arg.String F._dllpath,
           "<dir>  Add <dir> to the run-time search path for shared libraries";
    "-dtypes", Arg.Unit F._annot, " (deprecated) same as -annot";
     "-for-pack", Arg.String (fun s -> ()),
           "<ident>  Ignored (for compatibility with ocamlopt)";
    "-g", Arg.Unit F._g, " Save debugging information";
    "-i", Arg.Unit F._i, " Print inferred interface";
    "-I", Arg.String F._I,
           "<dir>  Add <dir> to the list of include directories";
    "-impl", Arg.String F._impl, "<file>  Compile <file> as a .ml file";
    "-intf", Arg.String F._intf, "<file>  Compile <file> as a .mli file";
    "-intf-suffix", Arg.String F._intf_suffix,
           "<string>  Suffix for interface files (default: .mli)";
    "-intf_suffix", Arg.String F._intf_suffix,
           "<string>  (deprecated) same as -intf-suffix";
    "-labels", Arg.Unit F._labels, " Use commuting label mode";
    "-linkall", Arg.Unit F._linkall, " Link all modules, even unused ones";
    "-make-runtime", Arg.Unit F._make_runtime,
           " Build a runtime system with given C objects and libraries";
    "-make_runtime", Arg.Unit F._make_runtime,
           " (deprecated) same as -make-runtime";
    "-modern", Arg.Unit F._labels, " (deprecated) same as -labels";
    "-noassert", Arg.Unit F._noassert, " Don't compile assertion checks";
    "-noautolink", Arg.Unit F._noautolink,
           " Don't automatically link C libraries specified in .cma files";
    "-nolabels", Arg.Unit F._nolabels, " Ignore non-optional labels in types";
    "-nostdlib", Arg.Unit F._nostdlib,
           " do not add default directory to the list of include directories";
    "-o", Arg.String F._o, "<file>  Set output file name to <file>";
    "-output-obj", Arg.Unit F._output_obj,
           " Output a C object file instead of an executable";
    "-pack", Arg.Unit F._pack,
           " Package the given .cmo files into one .cmo";
    "-pp", Arg.String F._pp,
           "<command>  Pipe sources through preprocessor <command>";
    "-principal", Arg.Unit F._principal,
           " Check principality of type inference";
    "-rectypes", Arg.Unit F._rectypes, " Allow arbitrary recursive types";
    "-thread", Arg.Unit F._thread,
           " Generate code that supports the system threads library";
    "-unsafe", Arg.Unit F._unsafe,
           " No bounds checking on array and string access";
    "-use-runtime", Arg.String F._use_runtime,
           "<file>  Generate bytecode for the given runtime system";
    "-use_runtime", Arg.String F._use_runtime,
           "<file>  (deprecated) same as -use-runtime";
    "-v", Arg.Unit F._v,
           " Print compiler version and location of standard library and exit";
    "-version", Arg.Unit F._version, " Print compiler version and exit";
    "-verbose", Arg.Unit F._verbose, " Print calls to external commands";
    "-vmthread", Arg.Unit F._vmthread,
           " Generate code that supports the threads library with VM-level\n\
      \     scheduling";
    "-w", Arg.String F._w,
      "<flags>  Enable or disable warnings according to <flags>:\n\
      \032    C/c enable/disable suspicious comment\n\
      \032    D/d enable/disable deprecated features\n\
      \032    E/e enable/disable fragile match\n\
      \032    F/f enable/disable partially applied function\n\
      \032    L/l enable/disable labels omitted in application\n\
      \032    M/m enable/disable overriden methods\n\
      \032    P/p enable/disable partial match\n\
      \032    S/s enable/disable non-unit statement\n\
      \032    U/u enable/disable unused match case\n\
      \032    V/v enable/disable overriden instance variables\n\
      \032    Y/y enable/disable suspicious unused variables\n\
      \032    Z/z enable/disable all other unused variables\n\
      \032    X/x enable/disable all other warnings\n\
      \032    A/a enable/disable all warnings\n\
      \032    default setting is \"Aelz\"";
    "-warn-error" , Arg.String F._warn_error,
     "<flags>  Treat the warnings of <flags> as errors, if they are\n\
      \     enabled.  See option -w for the list of flags.\n\
      \     Default setting is \"a\" (warnings are not errors)";
    "-where", Arg.Unit F._where,
           " Print location of standard library and exit";
    "-nopervasives", Arg.Unit F._nopervasives, " (undocumented)";
    "-dparsetree", Arg.Unit F._dparsetree, " (undocumented)";
    "-drawlambda", Arg.Unit F._drawlambda, " (undocumented)";
    "-dlambda", Arg.Unit F._dlambda, " (undocumented)";
    "-dinstr", Arg.Unit F._dinstr, " (undocumented)";
    "-use-prims", Arg.String F._use_prims, "<file>  (undocumented)";

    "-", Arg.String F.anonymous,
           "<file>  Treat <file> as a file name (even if it starts with `-')";
  ]
end;;