summaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
authorFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>2012-01-17 21:57:54 +0000
committerFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>2012-01-17 21:57:54 +0000
commit869feeb00704e0640c45ffe6aee6cc13e4077f79 (patch)
tree748a9fa5c80cb8b433e95fd029d0a86eb9da815f /driver
parent28c7bcd42df75504b27f11f2fa9d620f9fbb405b (diff)
Fix PR#5461
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12033 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'driver')
-rw-r--r--driver/main.ml20
1 files changed, 11 insertions, 9 deletions
diff --git a/driver/main.ml b/driver/main.ml
index e3dea594e..5c47a74dd 100644
--- a/driver/main.ml
+++ b/driver/main.ml
@@ -75,10 +75,12 @@ let print_standard_library () =
let usage = "Usage: ocamlc <options> <files>\nOptions are:"
+let ppf = Format.err_formatter
+
(* Error messages to standard error formatter *)
-let anonymous = process_file Format.err_formatter;;
-let impl = process_implementation_file Format.err_formatter;;
-let intf = process_interface_file Format.err_formatter;;
+let anonymous = process_file ppf;;
+let impl = process_implementation_file ppf;;
+let intf = process_interface_file ppf;;
let show_config () =
Config.print_config stdout;
@@ -170,14 +172,14 @@ let main () =
if !make_archive then begin
Compile.init_path();
- Bytelibrarian.create_archive (List.rev !objfiles)
+ Bytelibrarian.create_archive ppf (List.rev !objfiles)
(extract_output !output_name)
end
else if !make_package then begin
Compile.init_path();
- let exctracted_output = extract_output !output_name in
- let revd = List.rev !objfiles in
- Bytepackager.package_files (revd)
+ let exctracted_output = extract_output !output_name in
+ let revd = List.rev !objfiles in
+ Bytepackager.package_files ppf (revd)
(exctracted_output)
end
else if not !compile_only && !objfiles <> [] then begin
@@ -198,11 +200,11 @@ let main () =
default_output !output_name
in
Compile.init_path();
- Bytelink.link (List.rev !objfiles) target
+ Bytelink.link ppf (List.rev !objfiles) target
end;
exit 0
with x ->
- Errors.report_error Format.err_formatter x;
+ Errors.report_error ppf x;
exit 2
let _ = main ()