]> git.pld-linux.org Git - packages/ocaml.git/blame - ocaml-objinfo.patch
outdated
[packages/ocaml.git] / ocaml-objinfo.patch
CommitLineData
811e5ac0
MM
1diff -ur ocaml-3.04/tools/objinfo.ml ocaml-3.04-/tools/objinfo.ml
2--- ocaml-3.04/tools/objinfo.ml Mon Mar 27 14:18:09 2000
3+++ ocaml-3.04-/tools/objinfo.ml Wed May 8 11:30:02 2002
4@@ -62,6 +62,29 @@
5 print_string name; print_newline())
6 crcs
7
8+let print_opt_info ui =
9+ print_string " Unit name: "; print_string ui.Compilenv.ui_name;
10+ print_newline();
11+ print_string " Interfaces imported:"; print_newline();
12+ List.iter
13+ (fun (name, digest) ->
14+ print_string "\t"; print_digest digest; print_string "\t";
15+ print_string name; print_newline())
16+ ui.Compilenv.ui_imports_cmi;
17+ print_string " Infos imported:"; print_newline();
18+ List.iter
19+ (fun (name, digest) ->
20+ print_string "\t"; print_digest digest; print_string "\t";
21+ print_string name; print_newline())
22+ ui.Compilenv.ui_imports_cmx
23+
24+let print_opt_library_info lib =
25+ print_string " Extra C object files:";
26+ List.iter print_spaced_string lib.Compilenv.lib_ccobjs; print_newline();
27+ print_string " Extra C options:";
28+ List.iter print_spaced_string lib.Compilenv.lib_ccopts; print_newline();
29+ List.iter print_opt_info (List.map fst lib.Compilenv.lib_units)
30+
31 let dump_obj filename =
32 print_string "File "; print_string filename; print_newline();
33 let ic = open_in_bin filename in
34@@ -86,6 +109,16 @@
35 let crcs = input_value ic in
36 close_in ic;
37 print_intf_info name sign comps crcs
38+ end else
39+ if buffer = cmx_magic_number then begin
40+ let ui = (input_value ic : Compilenv.unit_infos) in
41+ close_in ic;
42+ print_opt_info ui
43+ end else
44+ if buffer = cmxa_magic_number then begin
45+ let li = (input_value ic : Compilenv.library_infos) in
46+ close_in ic;
47+ print_opt_library_info li
48 end else begin
49 prerr_endline "Not an object file"; exit 2
50 end
This page took 0.063009 seconds and 4 git commands to generate.