1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
(** Build orchestration and compilation *)
(** Exception raised when C compilation fails *)
exception CCompilationFailed of string
(** Exception raised when OCaml compilation fails *)
exception CompilationFailed of string
(** Exception raised for internal consistency errors *)
exception InternalInconsistency of string * string
val build_exe : Prepare.build_state -> Project.Executable.t -> unit
(** [build_exe bstate exe] builds a single executable
Prepares compilation state and compiles the executable
with all its dependencies.
@param bstate global build state
@param exe executable to build
@raise CCompilationFailed if C compilation fails
@raise CompilationFailed if OCaml compilation fails *)
val build_dag : Prepare.build_state -> Project.t -> Target.Name.t Dag.t -> unit
(** [build_dag bstate proj_file targets_dag] builds targets according to DAG
Orchestrates parallel compilation of multiple targets
respecting dependency order defined in the DAG.
@param bstate global build state
@param proj_file project configuration
@param targets_dag target dependency DAG
@raise CCompilationFailed if C compilation fails
@raise CompilationFailed if OCaml compilation fails *)
val sanity_check : Filepath.filepath -> Target.target -> unit
(** [sanity_check build_dir target] verifies all target output files exist
Checks that all expected compilation outputs are present
in the build directory. Logs warnings for missing files.
@param build_dir target build directory
@param target target to check *)
|