module OCaml:sig..end
OCaml configuration.
typeconf =Topkg.Conf.t
type t
The type for OCaml configurations.
val v : conf -> Topkg.Conf.os -> tv c os is the configuration of the OCaml system for the OS
os obtained by reading the output of tool "ocamlc" os with
the -config option.
val find : string -> t -> string optionfind k c looks up key k in configuration c.
val version : t -> int * int * int * string optionversion is the compiler version string
"major.minor[.patchlevel][+additional-info]" parsed into
(major, minor, patch, additional-info).
val ext_asm : t -> stringext_asm is the file extension for assembly files, e.g. ".s".
val ext_obj : t -> stringext_asm is the file extension for C object files, e.g. ".o".
val ext_lib : t -> stringext_lib is the file extension for C static libraries, e.g. ".a".
val ext_dll : t -> stringext_dll is the file extension for C dynamically linked libraries,
e.g. ".so".
val ext_exe : t -> stringext_exe is the file extension for binary executables, e.g. ".exe"
or "". Until at least OCaml 4.03 this information is not readily
available (see
PR #7173) and
discovered as described in
this message.
val native : t -> boolnative is true if native compilation (i.e. ocamlopt) is
available. Until at least OCaml 4.03 this information is not
readily available (see
PR #7173) and
true is returned iff the standard library directory has the
libasmrun C static library.
val native_dynlink : t -> boolnative_dynlink is true if native dynamic linking is
available. Until at least OCaml 4.03 this information is not
readily available (see
PR #7173) and
true is returned iff the standard library directory has the
dynlink.cmxa library.
: t -> boolsupports_shared_libraries is true if compilation of C
shared libraries is supported. Until OCaml 4.08 this
information is not readily available (see
PR 1691). Before
that it checks for the existence of either "libasmrun_shared" or
^ ext_dll c"libcamlrun_shared" ^ ext_dll c in the standard
library directory.
val word_size : t -> intword_size is the bit size of one word on the OS that will
execute the programs produced by the compiler (i.e. the value
of Sys.word_size in these programs). Until at least OCaml
4.03 this information is not readily available (see
PR #7173) and
the information is read from the C SIZEOF_PTR macro defined in
the file caml/config.h of the standard library directory.
val dump : Stdlib.Format.formatter -> t -> unitdump ppf c prints an unspecified representation of c on ppf.