1998-04-06 09:32:57 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Objective Caml *)
|
|
|
|
(* *)
|
|
|
|
(* Damien Doligez, projet Para, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 1998 Institut National de Recherche en Informatique et *)
|
|
|
|
(* en Automatique. Distributed only by permission. *)
|
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
|
|
|
module Make_options (F :
|
|
|
|
sig
|
|
|
|
val _a : unit -> unit
|
|
|
|
val _c : unit -> unit
|
1998-11-06 07:39:43 -08:00
|
|
|
val _cc : string -> unit
|
1998-04-06 09:32:57 -07:00
|
|
|
val _cclib : string -> unit
|
|
|
|
val _ccopt : string -> unit
|
|
|
|
val _custom : unit -> unit
|
|
|
|
val _g : unit -> unit
|
|
|
|
val _i : unit -> unit
|
|
|
|
val _I : string -> unit
|
|
|
|
val _impl : string -> unit
|
|
|
|
val _intf : string -> unit
|
1998-05-27 07:10:14 -07:00
|
|
|
val _intf_suffix : string -> unit
|
1998-04-06 09:32:57 -07:00
|
|
|
val _linkall : unit -> unit
|
1998-04-14 07:48:34 -07:00
|
|
|
val _make_runtime : unit -> unit
|
1998-04-06 09:32:57 -07:00
|
|
|
val _noassert : unit -> unit
|
|
|
|
val _o : string -> unit
|
|
|
|
val _output_obj : unit -> unit
|
|
|
|
val _pp : string -> unit
|
1999-11-08 15:45:01 -08:00
|
|
|
val _rectypes : unit -> unit
|
1998-04-06 09:32:57 -07:00
|
|
|
val _thread : unit -> unit
|
|
|
|
val _unsafe : unit -> unit
|
1998-10-02 05:40:44 -07:00
|
|
|
val _use_prims : string -> unit
|
1998-04-14 07:48:34 -07:00
|
|
|
val _use_runtime : string -> unit
|
1998-04-06 09:32:57 -07:00
|
|
|
val _v : unit -> unit
|
|
|
|
val _verbose : unit -> unit
|
1998-11-05 00:01:50 -08:00
|
|
|
val _w : string -> unit
|
1998-04-06 09:32:57 -07:00
|
|
|
val _nopervasives : unit -> unit
|
1999-09-08 10:42:13 -07:00
|
|
|
val _dparsetree : unit -> unit
|
1998-04-06 09:32:57 -07:00
|
|
|
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";
|
|
|
|
"-c", Arg.Unit F._c, " Compile only (do not link)";
|
1998-11-06 07:39:43 -08:00
|
|
|
"-cc", Arg.String F._cc,
|
|
|
|
"<comp> Use <comp> as the C compiler and linker";
|
1998-04-06 09:32:57 -07:00
|
|
|
"-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";
|
|
|
|
"-custom", Arg.Unit F._custom, " Link in custom mode";
|
|
|
|
"-g", Arg.Unit F._g, " Save debugging information";
|
|
|
|
"-i", Arg.Unit F._i, " Print the types";
|
|
|
|
"-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";
|
1998-11-04 02:56:01 -08:00
|
|
|
"-intf-suffix", Arg.String F._intf_suffix,
|
1998-05-27 07:10:14 -07:00
|
|
|
"<file> Suffix for interface file (default: .mli)";
|
1999-08-15 09:30:42 -07:00
|
|
|
"-intf_suffix", Arg.String F._intf_suffix,
|
|
|
|
"<file> (deprecated) same as -intf-suffix";
|
1998-04-06 09:32:57 -07:00
|
|
|
"-linkall", Arg.Unit F._linkall, " Link all modules, even unused ones";
|
1998-11-04 02:56:01 -08:00
|
|
|
"-make-runtime", Arg.Unit F._make_runtime,
|
1998-04-14 07:48:34 -07:00
|
|
|
" Build a runtime system with given C objects and libraries";
|
1999-08-15 09:30:42 -07:00
|
|
|
"-make_runtime", Arg.Unit F._make_runtime,
|
|
|
|
" (deprecated) same as -make-runtime";
|
1998-04-06 09:32:57 -07:00
|
|
|
"-noassert", Arg.Unit F._noassert, " Do not compile assertion checks";
|
|
|
|
"-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";
|
|
|
|
"-pp", Arg.String F._pp,
|
|
|
|
"<command> Pipe sources through preprocessor <command>";
|
|
|
|
"-thread", Arg.Unit F._thread, " Use thread-safe standard library";
|
|
|
|
"-unsafe", Arg.Unit F._unsafe,
|
|
|
|
" No bounds checking on array and string access";
|
1998-11-04 02:56:01 -08:00
|
|
|
"-use-runtime", Arg.String F._use_runtime,
|
1998-10-02 05:40:44 -07:00
|
|
|
"<path> Generate bytecode for the given runtime system";
|
1999-08-15 09:30:42 -07:00
|
|
|
"-use_runtime", Arg.String F._use_runtime,
|
|
|
|
"<path> (deprecated) same as -use-runtime";
|
1998-04-06 09:32:57 -07:00
|
|
|
"-v", Arg.Unit F._v, " Print compiler version number";
|
|
|
|
"-verbose", Arg.Unit F._verbose, " Print calls to external commands";
|
1998-11-05 10:53:15 -08:00
|
|
|
"-w", Arg.String F._w,
|
|
|
|
"<flags> Enable or disable warnings according to <flags>:\n\
|
1998-11-05 00:01:50 -08:00
|
|
|
\032 A/a enable/disable all warnings\n\
|
1999-10-21 03:04:08 -07:00
|
|
|
\032 C/c enable/disable suspicious comment\n\
|
1998-11-05 00:01:50 -08:00
|
|
|
\032 F/f enable/disable partially applied function\n\
|
1999-10-21 03:04:08 -07:00
|
|
|
\032 M/m enable/disable overriden method\n\
|
1998-11-05 00:01:50 -08:00
|
|
|
\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\
|
1999-10-21 03:04:08 -07:00
|
|
|
\032 V/v enable/disable hidden instance variable\n\
|
1998-11-05 00:01:50 -08:00
|
|
|
\032 X/x enable/disable all other warnings\n\
|
1998-11-05 10:53:15 -08:00
|
|
|
\032 default setting is A (all warnings enabled)";
|
1998-04-06 09:32:57 -07:00
|
|
|
|
|
|
|
"-nopervasives", Arg.Unit F._nopervasives, " (undocumented)";
|
1999-09-08 10:42:13 -07:00
|
|
|
"-dparsetree", Arg.Unit F._dparsetree, " (undocumented)";
|
1998-04-06 09:32:57 -07:00
|
|
|
"-drawlambda", Arg.Unit F._drawlambda, " (undocumented)";
|
|
|
|
"-dlambda", Arg.Unit F._dlambda, " (undocumented)";
|
|
|
|
"-dinstr", Arg.Unit F._dinstr, " (undocumented)";
|
1998-11-04 02:56:01 -08:00
|
|
|
"-use-prims", Arg.String F._use_prims, "<file> (undocumented)";
|
1999-11-08 15:45:01 -08:00
|
|
|
"-rectypes", Arg.Unit F._rectypes, " (undocumented)";
|
1998-04-06 09:32:57 -07:00
|
|
|
|
|
|
|
"-", Arg.String F.anonymous,
|
|
|
|
"<file> Treat <file> as a file name (even if it starts with `-')";
|
|
|
|
]
|
|
|
|
end;;
|