package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=00a6868b4dfa34565d0141b335622a81a0e8d5b9e3c6dfad025dabfa3df2db2a1302b492953bbbce30c3a4406c324fcec25250a00b38f6d18a69e15605e3b07e
doc/b0_b00_kit/B00_ocaml/Compile/index.html
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:B0_std.Cmd.t ->
reads:B0_std.Fpath.t list ->
c:B0_std.Fpath.t ->
o:B0_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:B0_std.Cmd.t ->
reads:B0_std.Fpath.t list ->
mli:B0_std.Fpath.t ->
o:B0_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:B0_std.Cmd.t ->
reads:B0_std.Fpath.t list ->
has_cmi:bool ->
ml:B0_std.Fpath.t ->
o:B0_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:B0_std.Cmd.t ->
reads:B0_std.Fpath.t list ->
has_cmi:bool ->
ml:B0_std.Fpath.t ->
o:B0_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:B0_std.Cmd.t ->
reads:B0_std.Fpath.t list ->
has_cmi:bool ->
ml:B0_std.Fpath.t ->
o:B0_std.Fpath.t ->
and_cmt:bool ->
unit
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:B0_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:B0_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:B0_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:B0_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
.