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 *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1998-04-06 09:32:57 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $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
|
2000-03-24 11:31:25 -08:00
|
|
|
val _labels : unit -> 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
|
2000-03-09 01:12:28 -08:00
|
|
|
val _noautolink : unit -> unit
|
1998-04-06 09:32:57 -07:00
|
|
|
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
|
2000-08-23 10:13:17 -07:00
|
|
|
val _warn_error : string -> unit
|
2000-11-07 06:41:12 -08:00
|
|
|
val _where : unit -> unit
|
2000-08-23 10:13:17 -07:00
|
|
|
|
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";
|
1999-11-29 11:03:27 -08:00
|
|
|
"-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";
|
|
|
|
"-intf-suffix", Arg.String F._intf_suffix,
|
|
|
|
"<file> Suffix for interface files (default: .mli)";
|
|
|
|
"-intf_suffix", Arg.String F._intf_suffix,
|
|
|
|
"<file> (deprecated) same as -intf-suffix";
|
2000-03-24 11:31:25 -08:00
|
|
|
"-labels", Arg.Unit F._labels, " Use commuting label mode";
|
1999-11-29 11:03:27 -08:00
|
|
|
"-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";
|
2000-03-24 11:31:25 -08:00
|
|
|
"-modern", Arg.Unit F._labels, " (deprecated) same as -labels";
|
2000-03-20 12:23:07 -08:00
|
|
|
"-noassert", Arg.Unit F._noassert, " Don't compile assertion checks";
|
2000-03-09 01:12:28 -08:00
|
|
|
"-noautolink", Arg.Unit F._noautolink,
|
|
|
|
" Don't automatically link C libraries specified in .cma files";
|
1999-11-29 11:03:27 -08:00
|
|
|
"-o", Arg.String F._o, "<file> Set output file name to <file>";
|
|
|
|
"-output-obj", Arg.Unit F._output_obj,
|
2000-03-20 12:23:07 -08:00
|
|
|
" Output a C object file instead of an executable";
|
1999-11-29 11:03:27 -08:00
|
|
|
"-pp", Arg.String F._pp,
|
|
|
|
"<command> Pipe sources through preprocessor <command>";
|
|
|
|
"-rectypes", Arg.Unit F._rectypes, " Allow arbitrary recursive types";
|
|
|
|
"-thread", Arg.Unit F._thread, " Use thread-safe standard library";
|
|
|
|
"-unsafe", Arg.Unit F._unsafe,
|
|
|
|
" No bounds checking on array and string access";
|
|
|
|
"-use-runtime", Arg.String F._use_runtime,
|
|
|
|
"<path> Generate bytecode for the given runtime system";
|
|
|
|
"-use_runtime", Arg.String F._use_runtime,
|
|
|
|
"<path> (deprecated) same as -use-runtime";
|
2000-11-07 06:41:12 -08:00
|
|
|
"-v", Arg.Unit F._v, " Print compiler version number and exit";
|
1999-11-29 11:03:27 -08:00
|
|
|
"-verbose", Arg.Unit F._verbose, " Print calls to external commands";
|
|
|
|
"-w", Arg.String F._w,
|
|
|
|
"<flags> Enable or disable warnings according to <flags>:\n\
|
|
|
|
\032 A/a enable/disable all warnings\n\
|
|
|
|
\032 C/c enable/disable suspicious comment\n\
|
|
|
|
\032 F/f enable/disable partially applied function\n\
|
|
|
|
\032 M/m enable/disable overriden method\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 hidden instance variable\n\
|
|
|
|
\032 X/x enable/disable all other warnings\n\
|
2000-08-23 10:13:17 -07:00
|
|
|
\032 default setting is \"A\" (all warnings enabled)";
|
|
|
|
"-warn-error" , Arg.String F._warn_error,
|
|
|
|
"<flags> Treat the warnings enabled by <flags> as errors.\n\
|
|
|
|
\032 See option -w for the list of flags.\n\
|
|
|
|
\032 Default setting is \"a\" (warnings are not errors)";
|
2000-11-07 06:41:12 -08:00
|
|
|
"-where", Arg.Unit F._where,
|
|
|
|
" Print location of standard library and exit";
|
1999-11-29 11:03:27 -08:00
|
|
|
"-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)";
|
1998-04-06 09:32:57 -07:00
|
|
|
|
1999-11-29 11:03:27 -08:00
|
|
|
"-", Arg.String F.anonymous,
|
|
|
|
"<file> Treat <file> as a file name (even if it starts with `-')";
|
1998-04-06 09:32:57 -07:00
|
|
|
]
|
|
|
|
end;;
|