2016-02-18 07:11:59 -08:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* OCaml *)
|
|
|
|
(* *)
|
|
|
|
(* 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 GNU Lesser General Public License version 2.1, with the *)
|
|
|
|
(* special exception on linking described in the file LICENSE. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
1998-04-06 09:32:57 -07:00
|
|
|
|
2014-10-15 06:34:58 -07:00
|
|
|
(* ATTENTION ! When you add or modify a parsing or typing option, do not forget
|
|
|
|
to update ocamldoc options too, in odoc_args.ml. *)
|
|
|
|
|
2014-05-04 19:05:30 -07:00
|
|
|
module type Common_options = sig
|
2011-12-20 02:35:43 -08:00
|
|
|
val _absname : unit -> unit
|
2018-11-15 00:51:35 -08:00
|
|
|
val _alert : string -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _I : string -> unit
|
|
|
|
val _labels : unit -> unit
|
2016-04-18 18:16:29 -07:00
|
|
|
val _alias_deps : unit -> unit
|
2014-05-04 19:05:30 -07:00
|
|
|
val _no_alias_deps : unit -> unit
|
2016-04-18 18:16:29 -07:00
|
|
|
val _app_funct : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _no_app_funct : unit -> unit
|
|
|
|
val _noassert : unit -> unit
|
|
|
|
val _nolabels : unit -> unit
|
|
|
|
val _nostdlib : unit -> unit
|
2014-05-10 17:17:05 -07:00
|
|
|
val _open : string -> unit
|
2013-01-25 01:12:31 -08:00
|
|
|
val _ppx : string -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _principal : unit -> unit
|
2016-03-16 18:50:46 -07:00
|
|
|
val _no_principal : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _rectypes : unit -> unit
|
2016-03-16 18:50:46 -07:00
|
|
|
val _no_rectypes : unit -> unit
|
2014-04-29 04:56:17 -07:00
|
|
|
val _safe_string : unit -> unit
|
2013-09-04 08:12:37 -07:00
|
|
|
val _short_paths : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _strict_sequence : unit -> unit
|
2016-03-16 18:50:46 -07:00
|
|
|
val _no_strict_sequence : unit -> unit
|
2014-08-29 10:14:00 -07:00
|
|
|
val _strict_formats : unit -> unit
|
2016-03-16 18:50:46 -07:00
|
|
|
val _no_strict_formats : unit -> unit
|
2016-05-25 07:29:05 -07:00
|
|
|
val _unboxed_types : unit -> unit
|
|
|
|
val _no_unboxed_types : unit -> unit
|
2014-04-29 04:56:17 -07:00
|
|
|
val _unsafe_string : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _version : unit -> unit
|
2010-05-20 07:06:29 -07:00
|
|
|
val _vnum : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _w : string -> unit
|
2019-09-27 02:00:21 -07:00
|
|
|
|
|
|
|
val anonymous : string -> unit
|
|
|
|
end
|
|
|
|
|
|
|
|
module type Core_options = sig
|
|
|
|
include Common_options
|
|
|
|
|
|
|
|
val _nopervasives : unit -> unit
|
|
|
|
val _unsafe : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _warn_error : string -> unit
|
2010-05-08 13:11:27 -07:00
|
|
|
val _warn_help : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
|
2018-02-19 05:09:49 -08:00
|
|
|
val _dno_unique_ids : unit -> unit
|
|
|
|
val _dunique_ids : unit -> unit
|
2019-12-24 04:35:42 -08:00
|
|
|
val _dno_locations : unit -> unit
|
|
|
|
val _dlocations : unit -> unit
|
2012-10-17 09:09:38 -07:00
|
|
|
val _dsource : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _dparsetree : unit -> unit
|
2012-12-18 09:19:53 -08:00
|
|
|
val _dtypedtree : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _drawlambda : unit -> unit
|
|
|
|
val _dlambda : unit -> unit
|
|
|
|
|
2019-09-27 02:00:21 -07:00
|
|
|
end
|
2010-04-13 03:44:25 -07:00
|
|
|
|
2016-03-16 18:50:46 -07:00
|
|
|
module type Compiler_options = sig
|
2010-04-13 03:44:25 -07:00
|
|
|
val _a : unit -> unit
|
|
|
|
val _annot : unit -> unit
|
2012-05-30 07:52:37 -07:00
|
|
|
val _binannot : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _c : unit -> unit
|
|
|
|
val _cc : string -> unit
|
|
|
|
val _cclib : string -> unit
|
|
|
|
val _ccopt : string -> unit
|
|
|
|
val _config : unit -> unit
|
ocamlc -config: new -config-var option to print specific configuration variables
The proposed behavior of `-config-var s` is as follows:
- if `s` is an existing configuration variable, print its value as
a string and exit with a success return value (0)
- if `s` is not an existing configuration variable, print nothing
and exit with a failure return value (non-0)
Note that we do not print a newline after the value of the
configuration variable. In particular, if the value is an empty
string, the output is undistinguishable from the output for
non-existing variables, the return value has to be considered instead.
The following alternative behaviors were considered:
- We could print a newline after the configuration value, which
would let users distinguish empty values from non-existing variables
by counting the lines of output, and would also be more pleasant for
users invoking the option from the command-line. However, the way
bash works on Windows means that $(ocamlc -config-var foo) would keep
a trailing \r in its output, and portable scripts would have to use
$(ocamlc -config-var foo | tr -d '\r') instead, which is a pain.
(This issue was pointed out by David Allsopp)
- We could print a message on the error output if the configuration
variable does not exist. This is clearer to a human user, but it is
annoying for scripts if they forget to silence the error output and
get their output mixed with our error messages. The main use of this
new feature is for scripting purposes.
2017-10-14 09:46:58 -07:00
|
|
|
val _config_var : string -> unit
|
2014-08-07 02:46:34 -07:00
|
|
|
val _for_pack : string -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _g : unit -> unit
|
2015-11-10 03:18:48 -08:00
|
|
|
val _stop_after : string -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _i : unit -> unit
|
|
|
|
val _impl : string -> unit
|
|
|
|
val _intf : string -> unit
|
|
|
|
val _intf_suffix : string -> unit
|
2015-06-28 06:11:50 -07:00
|
|
|
val _keep_docs : unit -> unit
|
2016-03-16 18:50:46 -07:00
|
|
|
val _no_keep_docs : unit -> unit
|
2013-09-17 05:45:05 -07:00
|
|
|
val _keep_locs : unit -> unit
|
2016-03-16 18:50:46 -07:00
|
|
|
val _no_keep_locs : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _linkall : unit -> unit
|
|
|
|
val _noautolink : unit -> unit
|
|
|
|
val _o : string -> unit
|
2016-02-11 03:39:14 -08:00
|
|
|
val _opaque : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _output_obj : unit -> unit
|
2015-07-17 07:31:05 -07:00
|
|
|
val _output_complete_obj : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _pack : unit -> unit
|
2016-06-29 08:14:20 -07:00
|
|
|
val _plugin : string -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _pp : string -> unit
|
|
|
|
val _principal : unit -> unit
|
2016-03-16 18:50:46 -07:00
|
|
|
val _no_principal : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _rectypes : unit -> unit
|
2011-03-17 09:18:05 -07:00
|
|
|
val _runtime_variant : string -> unit
|
2019-03-11 04:45:55 -07:00
|
|
|
val _with_runtime : unit -> unit
|
|
|
|
val _without_runtime : unit -> unit
|
2014-04-29 04:56:17 -07:00
|
|
|
val _safe_string : unit -> unit
|
2013-09-04 08:12:37 -07:00
|
|
|
val _short_paths : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _thread : unit -> unit
|
|
|
|
val _v : unit -> unit
|
2013-09-04 08:12:37 -07:00
|
|
|
val _verbose : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _where : unit -> unit
|
2015-08-15 08:57:51 -07:00
|
|
|
val _color : string -> unit
|
2018-10-19 13:20:30 -07:00
|
|
|
val _error_style : string -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
|
2018-05-18 14:21:01 -07:00
|
|
|
val _match_context_rows : int -> unit
|
2015-11-23 09:31:24 -08:00
|
|
|
val _dtimings : unit -> unit
|
2017-06-09 04:29:21 -07:00
|
|
|
val _dprofile : unit -> unit
|
2018-07-27 00:51:53 -07:00
|
|
|
val _dump_into_file : unit -> unit
|
2016-10-10 04:09:21 -07:00
|
|
|
|
2016-10-11 09:50:01 -07:00
|
|
|
val _args: string -> string array
|
|
|
|
val _args0: string -> string array
|
2014-05-04 19:05:30 -07:00
|
|
|
end
|
|
|
|
;;
|
2010-04-13 03:44:25 -07:00
|
|
|
|
2016-04-28 06:20:26 -07:00
|
|
|
module type Toplevel_options = sig
|
2019-09-27 02:00:21 -07:00
|
|
|
include Core_options
|
2016-04-28 06:20:26 -07:00
|
|
|
val _init : string -> unit
|
|
|
|
val _noinit : unit -> unit
|
2016-05-03 07:45:25 -07:00
|
|
|
val _no_version : unit -> unit
|
2016-04-28 06:20:26 -07:00
|
|
|
val _noprompt : unit -> unit
|
|
|
|
val _nopromptcont : unit -> unit
|
|
|
|
val _stdin : unit -> unit
|
2019-09-27 02:00:21 -07:00
|
|
|
val _args : string -> string array
|
|
|
|
val _args0 : string -> string array
|
2018-10-19 13:20:30 -07:00
|
|
|
val _color : string -> unit
|
|
|
|
val _error_style : string -> unit
|
2016-04-28 06:20:26 -07:00
|
|
|
end
|
|
|
|
;;
|
|
|
|
|
2014-05-04 19:05:30 -07:00
|
|
|
module type Bytecomp_options = sig
|
2019-09-27 02:00:21 -07:00
|
|
|
include Core_options
|
2014-05-04 19:05:30 -07:00
|
|
|
include Compiler_options
|
|
|
|
val _compat_32 : unit -> unit
|
|
|
|
val _custom : unit -> unit
|
2015-04-22 03:53:47 -07:00
|
|
|
val _no_check_prims : unit -> unit
|
2014-05-04 19:05:30 -07:00
|
|
|
val _dllib : string -> unit
|
|
|
|
val _dllpath : string -> unit
|
|
|
|
val _make_runtime : unit -> unit
|
2019-03-13 02:46:30 -07:00
|
|
|
val _vmthread : unit -> unit
|
2014-05-04 19:05:30 -07:00
|
|
|
val _use_runtime : string -> unit
|
2019-09-25 00:07:31 -07:00
|
|
|
val _output_complete_exe : unit -> unit
|
2014-05-04 19:05:30 -07:00
|
|
|
|
|
|
|
val _dinstr : unit -> unit
|
2018-06-27 06:56:29 -07:00
|
|
|
val _dcamlprimc : unit -> unit
|
2014-05-04 19:05:30 -07:00
|
|
|
|
|
|
|
val _use_prims : string -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
end;;
|
|
|
|
|
2014-05-04 19:05:30 -07:00
|
|
|
module type Bytetop_options = sig
|
2016-04-28 06:20:26 -07:00
|
|
|
include Toplevel_options
|
2014-05-04 19:05:30 -07:00
|
|
|
val _dinstr : unit -> unit
|
2019-09-27 02:00:21 -07:00
|
|
|
|
2014-05-04 19:05:30 -07:00
|
|
|
end;;
|
|
|
|
|
|
|
|
module type Optcommon_options = sig
|
|
|
|
val _compact : unit -> unit
|
2016-01-14 03:27:30 -08:00
|
|
|
val _inline : string -> unit
|
2016-01-26 07:43:24 -08:00
|
|
|
val _inline_toplevel : string -> unit
|
2016-02-10 08:52:07 -08:00
|
|
|
val _inlining_report : unit -> unit
|
2016-01-26 07:43:24 -08:00
|
|
|
val _dump_pass : string -> unit
|
2016-02-10 08:52:07 -08:00
|
|
|
val _inline_max_depth : string -> unit
|
2016-01-26 07:43:24 -08:00
|
|
|
val _rounds : int -> unit
|
2016-02-10 08:52:07 -08:00
|
|
|
val _inline_max_unroll : string -> unit
|
2016-01-26 07:43:24 -08:00
|
|
|
val _classic_inlining : unit -> unit
|
|
|
|
val _inline_call_cost : string -> unit
|
|
|
|
val _inline_alloc_cost : string -> unit
|
|
|
|
val _inline_prim_cost : string -> unit
|
|
|
|
val _inline_branch_cost : string -> unit
|
|
|
|
val _inline_indirect_cost : string -> unit
|
|
|
|
val _inline_lifting_benefit : string -> unit
|
|
|
|
val _unbox_closures : unit -> unit
|
2016-02-26 08:15:06 -08:00
|
|
|
val _unbox_closures_factor : int -> unit
|
2016-02-10 08:52:07 -08:00
|
|
|
val _inline_branch_factor : string -> unit
|
2016-01-26 07:43:24 -08:00
|
|
|
val _remove_unused_arguments : unit -> unit
|
2016-02-08 05:05:38 -08:00
|
|
|
val _no_unbox_free_vars_of_closures : unit -> unit
|
|
|
|
val _no_unbox_specialised_args : unit -> unit
|
2016-01-26 07:43:24 -08:00
|
|
|
val _o2 : unit -> unit
|
|
|
|
val _o3 : unit -> unit
|
2019-02-05 09:05:24 -08:00
|
|
|
val _insn_sched : unit -> unit
|
|
|
|
val _no_insn_sched : unit -> unit
|
2019-09-27 05:35:50 -07:00
|
|
|
val _linscan : unit -> unit
|
2019-09-27 05:48:36 -07:00
|
|
|
val _no_float_const_prop : unit -> unit
|
2014-05-04 19:05:30 -07:00
|
|
|
|
2016-01-26 07:43:24 -08:00
|
|
|
val _clambda_checks : unit -> unit
|
|
|
|
val _dflambda : unit -> unit
|
2016-02-09 02:33:57 -08:00
|
|
|
val _drawflambda : unit -> unit
|
2018-04-06 01:49:57 -07:00
|
|
|
val _dflambda_invariants : unit -> unit
|
2016-02-09 02:33:57 -08:00
|
|
|
val _dflambda_no_invariants : unit -> unit
|
2016-01-26 07:43:24 -08:00
|
|
|
val _dflambda_let : int -> unit
|
|
|
|
val _dflambda_verbose : unit -> unit
|
|
|
|
val _drawclambda : unit -> unit
|
2012-02-21 09:41:02 -08:00
|
|
|
val _dclambda : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _dcmm : unit -> unit
|
|
|
|
val _dsel : unit -> unit
|
|
|
|
val _dcombine : unit -> unit
|
2014-04-26 03:40:22 -07:00
|
|
|
val _dcse : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _dlive : unit -> unit
|
2017-09-15 03:08:14 -07:00
|
|
|
val _davail : unit -> unit
|
|
|
|
val _drunavail : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _dspill : unit -> unit
|
|
|
|
val _dsplit : unit -> unit
|
|
|
|
val _dinterf : unit -> unit
|
|
|
|
val _dprefer : unit -> unit
|
|
|
|
val _dalloc : unit -> unit
|
|
|
|
val _dreload : unit -> unit
|
|
|
|
val _dscheduling : unit -> unit
|
|
|
|
val _dlinear : unit -> unit
|
2019-09-27 05:57:53 -07:00
|
|
|
val _dinterval : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
val _dstartup : unit -> unit
|
2014-05-04 19:05:30 -07:00
|
|
|
end;;
|
2010-04-13 03:44:25 -07:00
|
|
|
|
2014-05-04 19:05:30 -07:00
|
|
|
module type Optcomp_options = sig
|
2019-09-27 02:00:21 -07:00
|
|
|
include Core_options
|
2014-05-04 19:05:30 -07:00
|
|
|
include Compiler_options
|
|
|
|
include Optcommon_options
|
|
|
|
val _nodynlink : unit -> unit
|
|
|
|
val _p : unit -> unit
|
|
|
|
val _pp : string -> unit
|
|
|
|
val _S : unit -> unit
|
|
|
|
val _shared : unit -> unit
|
2016-12-06 08:18:04 -08:00
|
|
|
val _afl_instrument : unit -> unit
|
|
|
|
val _afl_inst_ratio : int -> unit
|
2019-06-27 09:07:25 -07:00
|
|
|
val _function_sections : unit -> unit
|
2014-05-04 19:05:30 -07:00
|
|
|
end;;
|
|
|
|
|
|
|
|
module type Opttop_options = sig
|
2016-04-28 06:20:26 -07:00
|
|
|
include Toplevel_options
|
2014-05-04 19:05:30 -07:00
|
|
|
include Optcommon_options
|
2016-07-20 07:36:59 -07:00
|
|
|
val _verbose : unit -> unit
|
2014-05-04 19:05:30 -07:00
|
|
|
val _S : unit -> unit
|
2010-04-13 03:44:25 -07:00
|
|
|
end;;
|
|
|
|
|
2016-03-16 18:50:46 -07:00
|
|
|
module type Ocamldoc_options = sig
|
2014-10-15 06:34:58 -07:00
|
|
|
include Common_options
|
|
|
|
val _impl : string -> unit
|
|
|
|
val _intf : string -> unit
|
|
|
|
val _intf_suffix : string -> unit
|
|
|
|
val _pp : string -> unit
|
|
|
|
val _thread : unit -> unit
|
|
|
|
val _v : unit -> unit
|
|
|
|
val _verbose : unit -> unit
|
2019-03-13 02:46:30 -07:00
|
|
|
val _vmthread : unit -> unit
|
2019-09-27 02:00:21 -07:00
|
|
|
end
|
2014-10-15 06:34:58 -07:00
|
|
|
|
2010-04-13 03:44:25 -07:00
|
|
|
module type Arg_list = sig
|
|
|
|
val list : (string * Arg.spec * string) list
|
|
|
|
end;;
|
|
|
|
|
2019-10-14 03:11:01 -07:00
|
|
|
module Make_bytecomp_options : Bytecomp_options -> Arg_list;;
|
|
|
|
module Make_bytetop_options : Bytetop_options -> Arg_list;;
|
|
|
|
module Make_optcomp_options : Optcomp_options -> Arg_list;;
|
|
|
|
module Make_opttop_options : Opttop_options -> Arg_list;;
|
|
|
|
module Make_ocamldoc_options : Ocamldoc_options -> Arg_list;;
|
2018-07-22 00:03:58 -07:00
|
|
|
|
|
|
|
(** [options_with_command_line_syntax options r] returns [options2] that behaves
|
|
|
|
like [options], but additionally pushes command line argument on [r] (quoted
|
|
|
|
by [Filename.quote] when necessary).
|
|
|
|
This is meant for ocaml{c,opt}p, which use this to forward most of their
|
|
|
|
arguments to ocaml{c,opt}. *)
|
|
|
|
val options_with_command_line_syntax
|
|
|
|
: (string * Arg.spec * string) list
|
|
|
|
-> string list ref
|
|
|
|
-> (string * Arg.spec * string) list
|
2019-09-27 03:16:09 -07:00
|
|
|
|
|
|
|
module Default: sig
|
|
|
|
module Topmain: Bytetop_options
|
|
|
|
module Opttopmain: Opttop_options
|
|
|
|
module Main: Bytecomp_options
|
|
|
|
module Optmain: Optcomp_options
|
|
|
|
module Odoc_args: Ocamldoc_options
|
|
|
|
end
|