jon.recoil.org

Module Linkenv

module CU := Compilation_unit
type filepath := string
type t

Values of type t are mutable structures.

val create : unit -> t
val extract_crc_interfaces : t -> Import_info.t list
val extract_crc_implementations : t -> Import_info.t list
val lib_ccopts : t -> string list
val lib_ccobjs : t -> filepath list
val make_globals_map : t -> unit_link_info list -> (CU.t * Digest.t option * Digest.t option * Symbol.t list) list
val add_ccobjs : t -> filepath -> Cmx_format.library_infos -> unit
val is_required : t -> Compilation_unit.t -> bool
val add_required : t -> (filepath * CU.Name.t option) -> Import_info.t -> unit
val remove_required : t -> CU.t -> unit
val add_quoted_cmi : t -> CU.Name.t list -> unit
val add_quoted_cmx : t -> CU.t list -> unit
val get_quoted_cmi : t -> CU.Name.Set.t
val get_quoted_cmx : t -> CU.Set.t
val extract_missing_globals : t -> (CU.t * filepath list) list
val check_cmi_consistency : t -> filepath -> Import_info.t array -> unit
val check_cmx_consistency : t -> filepath -> Import_info.t array -> unit
val check_consistency : t -> unit:unit_link_info -> Import_info.t array -> Import_info.t array -> unit
type error =
  1. | File_not_found of filepath
  2. | Not_an_object_file of filepath
  3. | Missing_implementations of (Compilation_unit.t * string list) list
  4. | Inconsistent_interface of Compilation_unit.Name.t * filepath * filepath
  5. | Inconsistent_implementation of Compilation_unit.t * filepath * filepath
  6. | Multiple_definition of Compilation_unit.Name.t * filepath * filepath
  7. | Missing_cmx of filepath * Compilation_unit.t
  8. | Linking_error of int
  9. | Archiver_error of string
  10. | Metaprogramming_not_supported_by_backend of filepath
  11. | Requires_metaprogramming_without_flag of filepath
exception Error of error