Module B00_ocaml.Compile

Compiling.

Tool invocations for compiling.

val c_to_o : ?post_exec:(B000.Op.t -> unit) -> ?k:(int -> unit) -> B00.Memo.t -> comp:B00.Tool.t -> opts:B00_std.Cmd.t -> reads:B00_std.Fpath.t list -> c:B00_std.Fpath.t -> o:B00_std.Fpath.t -> unit

c_to_o m ~comp ~opts ~reads ~c ~o compiles the C file c to the object file o with options opts and using compiler comp. It assumes the compilation depends on C include header files reads whose parent directories are added as -I options.

val mli_to_cmi : ?post_exec:(B000.Op.t -> unit) -> ?k:(int -> unit) -> and_cmti:bool -> B00.Memo.t -> comp:B00.Tool.t -> opts:B00_std.Cmd.t -> reads:B00_std.Fpath.t list -> mli:B00_std.Fpath.t -> o:B00_std.Fpath.t -> unit

mli_to_cmi ~and_cmti m ~comp ~opts ~reads ~mli ~o compiles the file mli to the cmi file o and, if and_cmti is true, to the cmti file Fpath.(o -+ ".cmti") with options opts and using compiler comp. It assumes the compilation depends on cmi files reads whose parent directories are added as -I options.

val ml_to_cmo : ?post_exec:(B000.Op.t -> unit) -> ?k:(int -> unit) -> and_cmt:bool -> B00.Memo.t -> opts:B00_std.Cmd.t -> reads:B00_std.Fpath.t list -> has_cmi:bool -> ml:B00_std.Fpath.t -> o:B00_std.Fpath.t -> unit

ml_to_cmo ~and_cmt m ~opts ~reads ~has_cmi ~ml ~o compiles the file ml to cmo file o and, if and_cmt is true, to the cmt file Fpath.(o -+ ".cmt") with options opts. It assumes the compilation depends on the cmi files reads whose parent directories are added as -I options. has_cmi indicates whether the ml file already a corresponding cmi file, in which case it should be in reads (FIXME specify path directly ?).

val ml_to_cmx : ?post_exec:(B000.Op.t -> unit) -> ?k:(int -> unit) -> and_cmt:bool -> B00.Memo.t -> opts:B00_std.Cmd.t -> reads:B00_std.Fpath.t list -> has_cmi:bool -> ml:B00_std.Fpath.t -> o:B00_std.Fpath.t -> unit

ml_to_cmx ~and_cmt m ~opts ~reads ~has_cmi ~ml ~o ~and_cmt compiles the file ml to cmx file o and, if and_cmt is true, to the cmt file Fpath.(o -+ ".cmt") with options opts. It assumes the compilation depends on the cmi and cmx files reads whose parent directories are added as -I options. has_cmi indicates whether the ml file already has a corresponding cmi file, in which case it should be in reads (FIXME specify path directly ?).

val ml_to_impl : ?post_exec:(B000.Op.t -> unit) -> ?k:(int -> unit) -> B00.Memo.t -> code:Conf.code -> opts:B00_std.Cmd.t -> reads:B00_std.Fpath.t list -> has_cmi:bool -> ml:B00_std.Fpath.t -> o:B00_std.Fpath.t -> and_cmt:bool -> unit

ml_to_impl is ml_to_cmo or ml_to_cmx according to code. Beware that the given arguments must be common to both

Mod.Src convenience

A few helpers that deal directly with the Mod.Src abstraction.

val mod_src_intf : and_cmti:bool -> B00.Memo.t -> comp:B00.Tool.t -> opts:B00_std.Cmd.t -> requires:Lib.t list -> mod_srcs:Mod.Src.t Mod.Name.Map.t -> Mod.Src.t -> unit

mod_src_intf m ~opts ~requires ~mod_srcs ~and_cmti src compiles the interface of src with options opts and compiler comp assuming its dependencies are in mod_srcs and requires. If and_cmti is true the cmti file is also produced. If src has no .mli this is a nop.

val mod_src_impl : and_cmt:bool -> B00.Memo.t -> code:Conf.code -> opts:B00_std.Cmd.t -> requires:Lib.t list -> mod_srcs:Mod.Src.t Mod.Name.Map.t -> Mod.Src.t -> unit

mod_src_impl m ~code ~opts ~requires ~mod_srcs src compile the implementation of src with option opts to code code asuming it dependencies are in mod_src. If and_cmt is true the cmt file is also produced. If src has no .ml this is a nop.

val intfs : and_cmti:bool -> B00.Memo.t -> comp:B00.Tool.t -> opts:B00_std.Cmd.t -> requires:Lib.t list -> mod_srcs:Mod.Src.t Mod.Name.Map.t -> unit

intfs iters mod_src_intf over the elements of mod_srcs.

val impls : and_cmt:bool -> B00.Memo.t -> code:Conf.code -> opts:B00_std.Cmd.t -> requires:Lib.t list -> mod_srcs:Mod.Src.t Mod.Name.Map.t -> unit

impls iters mod_src_impl over the elements of mod_srcs.