summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--driver/compile.ml14
-rw-r--r--driver/main.ml1
-rw-r--r--driver/optcompile.ml14
-rw-r--r--driver/optmain.ml1
4 files changed, 16 insertions, 14 deletions
diff --git a/driver/compile.ml b/driver/compile.ml
index d1f273b11..a962b22c4 100644
--- a/driver/compile.ml
+++ b/driver/compile.ml
@@ -49,7 +49,7 @@ let preprocess sourcefile tmpfile =
None -> sourcefile
| Some pp ->
let comm = pp ^ " " ^ sourcefile ^ " > " ^ tmpfile in
- if Sys.command comm <> 0 then begin
+ if Ccomp.command comm <> 0 then begin
Printf.eprintf "Preprocessing error\n";
flush stderr;
exit 2
@@ -126,19 +126,19 @@ let implementation sourcefile =
let (str, sg, finalenv) =
Typemod.type_structure (initial_env()) ast in
if !Clflags.print_types then (Printtyp.signature sg; print_newline());
- let (coercion, crc) =
+ let coercion =
if Sys.file_exists (prefixname ^ ".mli") then begin
let intf_file =
try find_in_path !load_path (prefixname ^ ".cmi")
with Not_found -> prefixname ^ ".cmi" in
- let (dclsig, crc) = Env.read_signature modulename intf_file in
- (Includemod.compunit sourcefile sg intf_file dclsig, crc)
+ let dclsig = Env.read_signature modulename intf_file in
+ Includemod.compunit sourcefile sg intf_file dclsig
end else begin
Typemod.check_nongen_schemes finalenv str;
- let crc = Env.save_signature sg modulename (prefixname ^ ".cmi") in
- (Tcoerce_none, crc)
+ Env.save_signature sg modulename (prefixname ^ ".cmi");
+ Tcoerce_none
end in
- Emitcode.to_file oc modulename crc
+ Emitcode.to_file oc modulename
(print_if Clflags.dump_instr Printinstr.instrlist
(Bytegen.compile_implementation modulename
(print_if Clflags.dump_lambda Printlambda.lambda
diff --git a/driver/main.ml b/driver/main.ml
index c3b5df7e0..4529d1efe 100644
--- a/driver/main.ml
+++ b/driver/main.ml
@@ -85,6 +85,7 @@ let main () =
"-unsafe", Arg.Set fast,
" No bounds checking on array and string access";
"-v", Arg.Unit print_version_number, " Print compiler version number";
+ "-verbose", Arg.Set verbose, " Print calls to external commands";
"-nopervasives", Arg.Set nopervasives, " (undocumented)";
"-drawlambda", Arg.Set dump_rawlambda, " (undocumented)";
diff --git a/driver/optcompile.ml b/driver/optcompile.ml
index 96c39bf5d..628bd3792 100644
--- a/driver/optcompile.ml
+++ b/driver/optcompile.ml
@@ -46,7 +46,7 @@ let preprocess sourcefile tmpfile =
None -> sourcefile
| Some pp ->
let comm = pp ^ " " ^ sourcefile ^ " > " ^ tmpfile in
- if Sys.command comm <> 0 then begin
+ if Ccomp.command comm <> 0 then begin
Printf.eprintf "Preprocessing error\n";
flush stderr;
exit 2
@@ -117,19 +117,19 @@ let implementation sourcefile =
let ast = parse_file inputfile Parse.implementation ast_impl_magic_number in
let (str, sg, finalenv) = Typemod.type_structure (initial_env()) ast in
if !Clflags.print_types then (Printtyp.signature sg; print_newline());
- let (coercion, crc) =
+ let coercion =
if Sys.file_exists (prefixname ^ ".mli") then begin
let intf_file =
try find_in_path !load_path (prefixname ^ ".cmi")
with Not_found -> prefixname ^ ".cmi" in
- let (dclsig, crc) = Env.read_signature modulename intf_file in
- (Includemod.compunit sourcefile sg intf_file dclsig, crc)
+ let dclsig = Env.read_signature modulename intf_file in
+ Includemod.compunit sourcefile sg intf_file dclsig
end else begin
Typemod.check_nongen_schemes finalenv str;
- let crc = Env.save_signature sg modulename (prefixname ^ ".cmi") in
- (Tcoerce_none, crc)
+ Env.save_signature sg modulename (prefixname ^ ".cmi");
+ Tcoerce_none
end in
- Compilenv.reset modulename crc;
+ Compilenv.reset modulename;
let (compunit_size, lam) =
Translmod.transl_store_implementation modulename str coercion in
Asmgen.compile_implementation prefixname compunit_size
diff --git a/driver/optmain.ml b/driver/optmain.ml
index e97e6bb27..ad6144367 100644
--- a/driver/optmain.ml
+++ b/driver/optmain.ml
@@ -87,6 +87,7 @@ let main () =
"-unsafe", Arg.Set fast,
" No bounds checking on array and string access";
"-v", Arg.Unit print_version_number, " Print compiler version number";
+ "-verbose", Arg.Set verbose, " Print calls to external commands";
"-nopervasives", Arg.Set nopervasives, " (undocumented)";
"-drawlambda", Arg.Set dump_rawlambda, " (undocumented)";