1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Objective Caml *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
1995-07-02 09:41:48 -07:00
|
|
|
(* Link a set of .cmx/.o files and produce an executable *)
|
|
|
|
|
|
|
|
open Sys
|
|
|
|
open Misc
|
|
|
|
open Config
|
|
|
|
open Compilenv
|
|
|
|
|
|
|
|
type error =
|
|
|
|
File_not_found of string
|
|
|
|
| Not_an_object_file of string
|
2000-04-10 08:01:30 -07:00
|
|
|
| Missing_implementations of (string * string list) list
|
1995-07-02 09:41:48 -07:00
|
|
|
| Inconsistent_interface of string * string * string
|
|
|
|
| Inconsistent_implementation of string * string * string
|
|
|
|
| Assembler_error of string
|
|
|
|
| Linking_error
|
2002-01-04 07:57:19 -08:00
|
|
|
| Multiple_definition of string * string * string
|
1995-07-02 09:41:48 -07:00
|
|
|
|
|
|
|
exception Error of error
|
|
|
|
|
|
|
|
(* Consistency check between interfaces and implementations *)
|
|
|
|
|
1995-10-09 06:37:11 -07:00
|
|
|
let crc_interfaces =
|
1996-04-22 04:15:41 -07:00
|
|
|
(Hashtbl.create 17 : (string, string * Digest.t) Hashtbl.t)
|
1995-10-09 06:37:11 -07:00
|
|
|
let crc_implementations =
|
1996-04-22 04:15:41 -07:00
|
|
|
(Hashtbl.create 17 : (string, string * Digest.t) Hashtbl.t)
|
1995-07-02 09:41:48 -07:00
|
|
|
|
|
|
|
let check_consistency file_name unit crc =
|
1995-10-09 06:37:11 -07:00
|
|
|
List.iter
|
|
|
|
(fun (name, crc) ->
|
1997-05-15 06:22:08 -07:00
|
|
|
if name = unit.ui_name then begin
|
|
|
|
Hashtbl.add crc_interfaces name (file_name, crc)
|
|
|
|
end else begin
|
|
|
|
try
|
|
|
|
let (auth_name, auth_crc) = Hashtbl.find crc_interfaces name in
|
|
|
|
if crc <> auth_crc then
|
|
|
|
raise(Error(Inconsistent_interface(name, file_name, auth_name)))
|
|
|
|
with Not_found ->
|
|
|
|
(* Can only happen for unit for which only a .cmi file was used,
|
|
|
|
but no .cmo is provided *)
|
|
|
|
Hashtbl.add crc_interfaces name (file_name, crc)
|
|
|
|
end)
|
1995-10-09 06:37:11 -07:00
|
|
|
unit.ui_imports_cmi;
|
1995-07-02 09:41:48 -07:00
|
|
|
List.iter
|
|
|
|
(fun (name, crc) ->
|
1995-11-09 05:21:49 -08:00
|
|
|
if crc <> cmx_not_found_crc then begin
|
1995-07-02 09:41:48 -07:00
|
|
|
try
|
|
|
|
let (auth_name, auth_crc) = Hashtbl.find crc_implementations name in
|
|
|
|
if crc <> auth_crc then
|
|
|
|
raise(Error(Inconsistent_implementation(name, file_name, auth_name)))
|
|
|
|
with Not_found ->
|
1995-11-09 05:21:49 -08:00
|
|
|
Hashtbl.add crc_implementations name (file_name, crc)
|
|
|
|
end)
|
1995-10-09 06:37:11 -07:00
|
|
|
unit.ui_imports_cmx;
|
2002-01-04 07:57:19 -08:00
|
|
|
try
|
|
|
|
let (name, crc) = Hashtbl.find crc_implementations unit.ui_name in
|
|
|
|
raise (Error(Multiple_definition(unit.ui_name, file_name, name)))
|
|
|
|
with Not_found ->
|
|
|
|
Hashtbl.add crc_implementations unit.ui_name (file_name, crc)
|
1995-07-02 09:41:48 -07:00
|
|
|
|
2002-02-08 08:55:44 -08:00
|
|
|
let extract_crcs table =
|
|
|
|
Hashtbl.fold (fun name (file_name, crc) accu -> (name, crc) :: accu)
|
|
|
|
table []
|
|
|
|
let extract_crc_interfaces () = extract_crcs crc_interfaces
|
|
|
|
let extract_crc_implementations () = extract_crcs crc_implementations
|
|
|
|
|
2000-03-09 01:12:28 -08:00
|
|
|
(* Add C objects and options and "custom" info from a library descriptor.
|
|
|
|
See bytecomp/bytelink.ml for comments on the order of C objects. *)
|
|
|
|
|
|
|
|
let lib_ccobjs = ref []
|
|
|
|
let lib_ccopts = ref []
|
|
|
|
|
|
|
|
let add_ccobjs l =
|
|
|
|
if not !Clflags.no_auto_link then begin
|
|
|
|
lib_ccobjs := l.lib_ccobjs @ !lib_ccobjs;
|
|
|
|
lib_ccopts := l.lib_ccopts @ !lib_ccopts
|
|
|
|
end
|
|
|
|
|
1995-07-02 09:41:48 -07:00
|
|
|
(* First pass: determine which units are needed *)
|
|
|
|
|
2000-04-10 08:01:30 -07:00
|
|
|
let missing_globals = (Hashtbl.create 17 : (string, string list ref) Hashtbl.t)
|
1995-07-02 09:41:48 -07:00
|
|
|
|
|
|
|
let is_required name =
|
2000-04-10 08:01:30 -07:00
|
|
|
try ignore (Hashtbl.find missing_globals name); true
|
|
|
|
with Not_found -> false
|
1995-07-02 09:41:48 -07:00
|
|
|
|
2000-04-10 08:01:30 -07:00
|
|
|
let add_required by (name, crc) =
|
|
|
|
try
|
|
|
|
let rq = Hashtbl.find missing_globals name in
|
|
|
|
rq := by :: !rq
|
|
|
|
with Not_found ->
|
|
|
|
Hashtbl.add missing_globals name (ref [by])
|
1995-07-02 09:41:48 -07:00
|
|
|
|
|
|
|
let remove_required name =
|
2000-04-10 08:01:30 -07:00
|
|
|
Hashtbl.remove missing_globals name
|
|
|
|
|
|
|
|
let extract_missing_globals () =
|
|
|
|
let mg = ref [] in
|
|
|
|
Hashtbl.iter (fun md rq -> mg := (md, !rq) :: !mg) missing_globals;
|
|
|
|
!mg
|
1995-07-02 09:41:48 -07:00
|
|
|
|
1995-11-06 03:04:55 -08:00
|
|
|
let scan_file obj_name tolink =
|
1995-07-02 09:41:48 -07:00
|
|
|
let file_name =
|
|
|
|
try
|
|
|
|
find_in_path !load_path obj_name
|
|
|
|
with Not_found ->
|
|
|
|
raise(Error(File_not_found obj_name)) in
|
1995-07-11 11:03:29 -07:00
|
|
|
if Filename.check_suffix file_name ".cmx" then begin
|
|
|
|
(* This is a .cmx file. It must be linked in any case.
|
|
|
|
Read the infos to see which modules it requires. *)
|
|
|
|
let (info, crc) = Compilenv.read_unit_info file_name in
|
|
|
|
remove_required info.ui_name;
|
2000-04-10 08:01:30 -07:00
|
|
|
List.iter (add_required file_name) info.ui_imports_cmx;
|
2001-11-29 01:55:06 -08:00
|
|
|
(info, file_name, crc) :: tolink
|
1995-07-11 11:03:29 -07:00
|
|
|
end
|
|
|
|
else if Filename.check_suffix file_name ".cmxa" then begin
|
|
|
|
(* This is an archive file. Each unit contained in it will be linked
|
|
|
|
in only if needed. *)
|
|
|
|
let ic = open_in_bin file_name in
|
|
|
|
let buffer = String.create (String.length cmxa_magic_number) in
|
|
|
|
really_input ic buffer 0 (String.length cmxa_magic_number);
|
|
|
|
if buffer <> cmxa_magic_number then
|
|
|
|
raise(Error(Not_an_object_file file_name));
|
2000-03-09 01:12:28 -08:00
|
|
|
let infos = (input_value ic : library_infos) in
|
1995-07-11 11:03:29 -07:00
|
|
|
close_in ic;
|
2000-03-09 01:12:28 -08:00
|
|
|
add_ccobjs infos;
|
1995-07-11 11:03:29 -07:00
|
|
|
List.fold_right
|
|
|
|
(fun (info, crc) reqd ->
|
1996-04-18 09:26:54 -07:00
|
|
|
if info.ui_force_link
|
2000-03-09 01:12:28 -08:00
|
|
|
|| !Clflags.link_everything
|
|
|
|
|| is_required info.ui_name
|
|
|
|
then begin
|
1995-07-11 11:03:29 -07:00
|
|
|
remove_required info.ui_name;
|
2000-04-10 08:01:30 -07:00
|
|
|
List.iter (add_required (Printf.sprintf "%s(%s)"
|
|
|
|
file_name info.ui_name))
|
|
|
|
info.ui_imports_cmx;
|
2001-11-29 01:55:06 -08:00
|
|
|
(info, file_name, crc) :: reqd
|
1995-07-11 11:03:29 -07:00
|
|
|
end else
|
|
|
|
reqd)
|
2000-03-09 01:12:28 -08:00
|
|
|
infos.lib_units tolink
|
1995-07-11 11:03:29 -07:00
|
|
|
end
|
|
|
|
else raise(Error(Not_an_object_file file_name))
|
1995-07-02 09:41:48 -07:00
|
|
|
|
|
|
|
(* Second pass: generate the startup file and link it with everything else *)
|
|
|
|
|
|
|
|
module IntSet = Set.Make(
|
|
|
|
struct
|
|
|
|
type t = int
|
|
|
|
let compare = compare
|
|
|
|
end)
|
|
|
|
|
2001-11-29 01:55:06 -08:00
|
|
|
let make_startup_file ppf filename units_list =
|
2000-04-21 01:13:22 -07:00
|
|
|
let compile_phrase p = Asmgen.compile_phrase ppf p in
|
1995-07-02 09:41:48 -07:00
|
|
|
let oc = open_out filename in
|
|
|
|
Emitaux.output_channel := oc;
|
1995-07-12 08:32:09 -07:00
|
|
|
Location.input_name := "startup"; (* set the name of the "current" input *)
|
1997-05-15 06:22:08 -07:00
|
|
|
Compilenv.reset "startup"; (* set the name of the "current" compunit *)
|
1995-07-02 09:41:48 -07:00
|
|
|
Emit.begin_assembly();
|
2002-02-08 08:55:44 -08:00
|
|
|
let name_list =
|
|
|
|
List.flatten (List.map (fun (info,_,_) -> info.ui_defines) units_list) in
|
2000-04-21 01:13:22 -07:00
|
|
|
compile_phrase (Cmmgen.entry_point name_list);
|
1995-12-19 07:09:10 -08:00
|
|
|
let apply_functions = ref (IntSet.add 2 (IntSet.add 3 IntSet.empty)) in
|
|
|
|
(* The callback functions always reference caml_apply[23] *)
|
|
|
|
let curry_functions =
|
|
|
|
ref IntSet.empty in
|
1995-07-02 09:41:48 -07:00
|
|
|
List.iter
|
2001-11-29 01:55:06 -08:00
|
|
|
(fun (info,_,_) ->
|
1995-07-02 09:41:48 -07:00
|
|
|
List.iter
|
|
|
|
(fun n -> apply_functions := IntSet.add n !apply_functions)
|
|
|
|
info.ui_apply_fun;
|
|
|
|
List.iter
|
|
|
|
(fun n -> curry_functions := IntSet.add n !curry_functions)
|
|
|
|
info.ui_curry_fun)
|
2001-11-29 01:55:06 -08:00
|
|
|
units_list;
|
1995-07-02 09:41:48 -07:00
|
|
|
IntSet.iter
|
2000-04-21 01:13:22 -07:00
|
|
|
(fun n -> compile_phrase (Cmmgen.apply_function n))
|
1995-07-02 09:41:48 -07:00
|
|
|
!apply_functions;
|
|
|
|
IntSet.iter
|
2000-04-21 01:13:22 -07:00
|
|
|
(fun n -> List.iter (compile_phrase) (Cmmgen.curry_function n))
|
1995-07-02 09:41:48 -07:00
|
|
|
!curry_functions;
|
1995-07-18 01:40:44 -07:00
|
|
|
Array.iter
|
2000-04-21 01:13:22 -07:00
|
|
|
(fun name -> compile_phrase (Cmmgen.predef_exception name))
|
1995-07-18 01:40:44 -07:00
|
|
|
Runtimedef.builtin_exceptions;
|
2000-04-21 01:13:22 -07:00
|
|
|
compile_phrase (Cmmgen.global_table name_list);
|
|
|
|
compile_phrase
|
1998-11-20 07:35:04 -08:00
|
|
|
(Cmmgen.globals_map
|
|
|
|
(List.map
|
2002-02-08 08:55:44 -08:00
|
|
|
(fun (unit,_,_) ->
|
|
|
|
let (auth_name,crc) = Hashtbl.find crc_interfaces unit.ui_name in
|
|
|
|
(unit.ui_name,crc))
|
|
|
|
units_list));
|
2000-04-21 01:13:22 -07:00
|
|
|
compile_phrase(Cmmgen.data_segment_table ("startup" :: name_list));
|
|
|
|
compile_phrase(Cmmgen.code_segment_table ("startup" :: name_list));
|
|
|
|
compile_phrase
|
1995-12-19 07:09:10 -08:00
|
|
|
(Cmmgen.frame_table("startup" :: "system" :: name_list));
|
1995-07-02 09:41:48 -07:00
|
|
|
Emit.end_assembly();
|
|
|
|
close_out oc
|
|
|
|
|
|
|
|
let call_linker file_list startup_file =
|
1998-08-06 06:27:38 -07:00
|
|
|
let libname =
|
|
|
|
if !Clflags.gprofile
|
|
|
|
then "libasmrunp" ^ ext_lib
|
|
|
|
else "libasmrun" ^ ext_lib in
|
1995-07-11 11:03:29 -07:00
|
|
|
let runtime_lib =
|
|
|
|
try
|
1999-11-08 10:50:36 -08:00
|
|
|
if !Clflags.nopervasives then ""
|
1999-11-08 07:25:41 -08:00
|
|
|
else find_in_path !load_path libname
|
1995-07-11 11:03:29 -07:00
|
|
|
with Not_found ->
|
1996-02-15 08:19:09 -08:00
|
|
|
raise(Error(File_not_found libname)) in
|
2000-10-27 08:18:24 -07:00
|
|
|
let c_lib = if !Clflags.nopervasives then "" else Config.native_c_libraries in
|
1996-02-15 08:19:09 -08:00
|
|
|
let cmd =
|
|
|
|
match Config.system with
|
|
|
|
"win32" ->
|
1996-11-07 02:55:02 -08:00
|
|
|
if not !Clflags.output_c_object then
|
|
|
|
Printf.sprintf "%s /Fe%s -I%s %s %s %s %s %s %s"
|
2000-04-16 07:36:00 -07:00
|
|
|
!Clflags.c_linker
|
1996-11-07 02:55:02 -08:00
|
|
|
!Clflags.exec_name
|
|
|
|
Config.standard_library
|
|
|
|
(String.concat " " (List.rev !Clflags.ccopts))
|
|
|
|
startup_file
|
|
|
|
(String.concat " " (List.rev file_list))
|
2000-04-16 07:36:00 -07:00
|
|
|
(String.concat " "
|
|
|
|
(List.rev_map Ccomp.expand_libname !Clflags.ccobjs))
|
1996-11-07 02:55:02 -08:00
|
|
|
runtime_lib
|
1999-11-08 07:25:41 -08:00
|
|
|
c_lib
|
1996-11-07 02:55:02 -08:00
|
|
|
else
|
1997-03-17 05:00:28 -08:00
|
|
|
Printf.sprintf "%s /out:%s %s %s"
|
|
|
|
Config.native_partial_linker
|
1996-11-07 02:55:02 -08:00
|
|
|
!Clflags.object_name
|
|
|
|
startup_file
|
|
|
|
(String.concat " " (List.rev file_list))
|
1996-02-15 08:19:09 -08:00
|
|
|
| _ ->
|
1996-11-07 02:55:02 -08:00
|
|
|
if not !Clflags.output_c_object then
|
2001-10-30 01:32:32 -08:00
|
|
|
Printf.sprintf "%s %s -o %s -I%s %s %s %s %s %s %s %s"
|
2000-04-16 07:36:00 -07:00
|
|
|
!Clflags.c_linker
|
1998-08-06 06:27:38 -07:00
|
|
|
(if !Clflags.gprofile then "-pg" else "")
|
1996-11-07 02:55:02 -08:00
|
|
|
!Clflags.exec_name
|
|
|
|
Config.standard_library
|
|
|
|
(String.concat " " (List.rev !Clflags.ccopts))
|
|
|
|
startup_file
|
|
|
|
(String.concat " " (List.rev file_list))
|
2000-04-16 07:36:00 -07:00
|
|
|
(String.concat " "
|
|
|
|
(List.map (fun dir -> if dir = "" then "" else "-L" ^ dir)
|
|
|
|
!load_path))
|
1996-11-07 02:55:02 -08:00
|
|
|
(String.concat " " (List.rev !Clflags.ccobjs))
|
|
|
|
runtime_lib
|
1999-11-08 07:25:41 -08:00
|
|
|
c_lib
|
1996-11-07 02:55:02 -08:00
|
|
|
else
|
1997-03-17 05:00:28 -08:00
|
|
|
Printf.sprintf "%s -o %s %s %s"
|
|
|
|
Config.native_partial_linker
|
1996-11-07 02:55:02 -08:00
|
|
|
!Clflags.object_name
|
|
|
|
startup_file
|
|
|
|
(String.concat " " (List.rev file_list))
|
1997-05-15 06:22:08 -07:00
|
|
|
in if Ccomp.command cmd <> 0 then raise(Error Linking_error)
|
1995-07-02 09:41:48 -07:00
|
|
|
|
|
|
|
let object_file_name name =
|
1995-07-11 11:03:29 -07:00
|
|
|
let file_name =
|
|
|
|
try
|
|
|
|
find_in_path !load_path name
|
|
|
|
with Not_found ->
|
|
|
|
fatal_error "Asmlink.object_file_name: not found" in
|
|
|
|
if Filename.check_suffix file_name ".cmx" then
|
1996-02-15 08:19:09 -08:00
|
|
|
Filename.chop_suffix file_name ".cmx" ^ ext_obj
|
1995-07-11 11:03:29 -07:00
|
|
|
else if Filename.check_suffix file_name ".cmxa" then
|
1996-02-15 08:19:09 -08:00
|
|
|
Filename.chop_suffix file_name ".cmxa" ^ ext_lib
|
1995-07-02 09:41:48 -07:00
|
|
|
else
|
1995-07-11 11:03:29 -07:00
|
|
|
fatal_error "Asmlink.object_file_name: bad ext"
|
1995-07-02 09:41:48 -07:00
|
|
|
|
|
|
|
(* Main entry point *)
|
|
|
|
|
2000-04-21 01:13:22 -07:00
|
|
|
let link ppf objfiles =
|
2001-11-27 05:47:13 -08:00
|
|
|
let stdlib =
|
|
|
|
if !Clflags.gprofile then "stdlib.p.cmxa" else "stdlib.cmxa" in
|
|
|
|
let stdexit =
|
|
|
|
if !Clflags.gprofile then "std_exit.p.cmx" else "std_exit.cmx" in
|
1998-08-06 06:27:38 -07:00
|
|
|
let objfiles =
|
2001-11-27 05:47:13 -08:00
|
|
|
if !Clflags.nopervasives then objfiles
|
|
|
|
else if !Clflags.output_c_object then stdlib :: objfiles
|
|
|
|
else stdlib :: (objfiles @ [stdexit]) in
|
1995-11-06 03:04:55 -08:00
|
|
|
let units_tolink = List.fold_right scan_file objfiles [] in
|
1995-11-09 05:21:49 -08:00
|
|
|
Array.iter remove_required Runtimedef.builtin_exceptions;
|
2000-04-10 08:01:30 -07:00
|
|
|
begin match extract_missing_globals() with
|
|
|
|
[] -> ()
|
|
|
|
| mg -> raise(Error(Missing_implementations mg))
|
|
|
|
end;
|
2001-11-29 01:55:06 -08:00
|
|
|
List.iter
|
|
|
|
(fun (info, file_name, crc) -> check_consistency file_name info crc)
|
|
|
|
units_tolink;
|
2000-03-09 01:12:28 -08:00
|
|
|
Clflags.ccobjs := !Clflags.ccobjs @ !lib_ccobjs;
|
2001-02-20 01:40:52 -08:00
|
|
|
Clflags.ccopts := !lib_ccopts @ !Clflags.ccopts; (* put user's opts first *)
|
1996-02-15 08:19:09 -08:00
|
|
|
let startup = Filename.temp_file "camlstartup" ext_asm in
|
2000-04-21 01:13:22 -07:00
|
|
|
make_startup_file ppf startup units_tolink;
|
1996-02-15 08:19:09 -08:00
|
|
|
let startup_obj = Filename.temp_file "camlstartup" ext_obj in
|
1995-07-02 09:41:48 -07:00
|
|
|
if Proc.assemble_file startup startup_obj <> 0 then
|
|
|
|
raise(Error(Assembler_error startup));
|
|
|
|
try
|
|
|
|
call_linker (List.map object_file_name objfiles) startup_obj;
|
1995-07-10 02:48:27 -07:00
|
|
|
if not !Clflags.keep_startup_file then remove_file startup;
|
1995-07-02 09:41:48 -07:00
|
|
|
remove_file startup_obj
|
|
|
|
with x ->
|
|
|
|
remove_file startup_obj;
|
|
|
|
raise x
|
|
|
|
|
|
|
|
(* Error report *)
|
|
|
|
|
2000-04-21 01:13:22 -07:00
|
|
|
open Format
|
1995-07-02 09:41:48 -07:00
|
|
|
|
2000-04-21 01:13:22 -07:00
|
|
|
let report_error ppf = function
|
|
|
|
| File_not_found name ->
|
|
|
|
fprintf ppf "Cannot find file %s" name
|
1995-07-02 09:41:48 -07:00
|
|
|
| Not_an_object_file name ->
|
2000-04-21 01:13:22 -07:00
|
|
|
fprintf ppf "The file %s is not a compilation unit description" name
|
1995-07-11 11:03:29 -07:00
|
|
|
| Missing_implementations l ->
|
2000-04-21 01:13:22 -07:00
|
|
|
let print_references ppf = function
|
|
|
|
| [] -> ()
|
|
|
|
| r1 :: rl ->
|
|
|
|
fprintf ppf "%s" r1;
|
|
|
|
List.iter (fun r -> fprintf ppf ",@ %s" r) rl in
|
|
|
|
let print_modules ppf =
|
|
|
|
List.iter
|
|
|
|
(fun (md, rq) ->
|
|
|
|
fprintf ppf "@ @[<hov 2>%s referenced from %a@]" md
|
|
|
|
print_references rq) in
|
|
|
|
fprintf ppf
|
|
|
|
"@[<v 2>No implementations provided for the following modules:%a@]"
|
|
|
|
print_modules l
|
1995-07-02 09:41:48 -07:00
|
|
|
| Inconsistent_interface(intf, file1, file2) ->
|
2000-04-21 01:13:22 -07:00
|
|
|
fprintf ppf
|
2001-11-29 01:55:06 -08:00
|
|
|
"@[<hov>Files %s@ and %s@ make inconsistent assumptions \
|
2000-02-08 12:00:06 -08:00
|
|
|
over interface %s@]"
|
|
|
|
file1 file2 intf
|
1995-07-02 09:41:48 -07:00
|
|
|
| Inconsistent_implementation(intf, file1, file2) ->
|
2000-04-21 01:13:22 -07:00
|
|
|
fprintf ppf
|
2001-11-29 01:55:06 -08:00
|
|
|
"@[<hov>Files %s@ and %s@ make inconsistent assumptions \
|
2000-02-08 12:00:06 -08:00
|
|
|
over implementation %s@]"
|
|
|
|
file1 file2 intf
|
1995-07-02 09:41:48 -07:00
|
|
|
| Assembler_error file ->
|
2000-04-21 01:13:22 -07:00
|
|
|
fprintf ppf "Error while assembling %s" file
|
1995-07-02 09:41:48 -07:00
|
|
|
| Linking_error ->
|
2000-04-21 01:13:22 -07:00
|
|
|
fprintf ppf "Error during linking"
|
2002-01-04 07:57:19 -08:00
|
|
|
| Multiple_definition(modname, file1, file2) ->
|
|
|
|
fprintf ppf
|
|
|
|
"@[<hov>Files %s@ and %s@ both define a module named %s@]"
|
|
|
|
file1 file2 modname
|