package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

dune-project
 Dependency

Authors

Maintainers

Sources

b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0

doc/b0.file/B0_ocaml/Conf/index.html

Module B0_ocaml.ConfSource

Toolchain configuration.

This module provides access to the OCaml toolchain configuration as output by ocaml{c,opt} -config.

Configuration

Sourcetype t

The type for the OCaml toolchain configuration.

Sourceval of_string : ?file:B0_std.Fpath.t -> string -> (t, string) result

of_string ~file data parses toolchain configuration from data as output by the compiler's -config option assuming it was read from file file (defaults to B0_std.Fpath.dash).

Sourceval write : B0_memo.t -> comp:B0_memo.Tool.t -> o:B0_std.Fpath.t -> unit

write m ~o writes the toolchain configuration to o by running comp with -config.

read m file reads a toolchain configuration from file.

Fields

Sourceval find : string -> t -> string option

find f c looks up the field f in configuration c. See ocamlc -config for the list of fields.

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

version c is the compiler version string "major.minor[.patchlevel][+additional-info]" parsed using (major, minor, patch, additional-info). If patch-level is absent it is turned into a 0.

Sourceval where : t -> B0_std.Fpath.t

where c is the location of OCaml's library directory.

Sourceval asm_ext : t -> B0_std.Fpath.ext

asm_ext is the file extension for assembly files.

Sourceval dll_ext : t -> B0_std.Fpath.ext

dll_ext is the file extension for C dynamic libraries.

Sourceval exe_ext : t -> B0_std.Fpath.ext

ext_ext is the file extension for executable binaries.

Sourceval lib_ext : t -> B0_std.Fpath.ext

ext_lib is the file extension for C static libraries.

Sourceval obj_ext : t -> B0_std.Fpath.ext

obj_ext is the file extension for C object files.

has_dynlink determines whether the platform supports dynamic linking.

Converting

Store key

conf is a memo key store with the OCaml configuration.

Sourceval version' : B0_build.t -> (int * int * int * string option) B0_std.Fut.t

version' b gets Conf.version from key.