package topkg

  1. Overview
  2. Docs

OCaml configuration.

OCaml system configuration

type conf = t
type t

The type for OCaml configurations.

val v : conf -> os -> t

v 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 option

find k c looks up key k in configuration c.

val version : t -> int * int * int * string option

version is the compiler version string "major.minor[.patchlevel][+additional-info]" parsed into (major, minor, patch, additional-info).

val ext_asm : t -> string

ext_asm is the file extension for assembly files, e.g. ".s".

val ext_obj : t -> string

ext_asm is the file extension for C object files, e.g. ".o".

val ext_lib : t -> string

ext_lib is the file extension for C static libraries, e.g. ".a".

val ext_dll : t -> string

ext_dll is the file extension for C dynamically linked libraries, e.g. ".so".

val ext_exe : t -> string

ext_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 -> bool

native 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.

native_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.

val dump : Format.formatter -> t -> unit

dump ppf c prints an unspecified representation of c on ppf.

OCaml

Innovation. Community. Security.