package cmdliner-stdlib
Module Cmdliner_stdlibSource
OCaml runtime keys
The OCaml runtime is usually configurable via the OCAMLRUNPARAM environment variable. We provide boot parameters covering these options.
--backtrace: Output a backtrace if an uncaught exception terminated the application. default is the default value if the parameter is not provided on the command-line.
--randomize-hashtables: Randomize all hash tables. default is the default value if the parameter is not provided on the command-line.
gc_control is a term that evaluates to a value of type Gc.control. default is the default value if the parameter is not provided on the command-line..
The OCaml garbage collector can be configured, as described in detail in GC control.
val setup :
?backtrace:bool option ->
?randomize_hashtables:bool option ->
?gc_control:Gc.control option ->
unit ->
unit Cmdliner.Term.tsetup ?backtrace ?randomize_hashtables ?gc_control () is the term that set the corresponding OCaml runtime parameters:
- if
backtraceis set toSome d, adding--backtraceon the command-line will callPrintexc.record_backtrace.dis the default if case no parameters are provided. If not set,backtraceisSome falseto match the default OCaml runtime behavior. - if
randomize_hashtablesis set toSome d, adding--randomize-hashtablesto the command-line will callHashtable.randomize ().dis the default if no paramaters are provided. If not set,randomize_hashtablesis set toSome falseto match the default OCaml runtime behavior. - if
gc_controlis set toSome d, various control parameters are added to the command-line options that will causeGc.setwith the right parameters.dis the default if no parameters are provided. If not set,gc_controlisSome (Gc.get ()).