aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-06-29 10:32:11 -0700
committerGraydon Hoare <[email protected]>2010-06-29 10:32:11 -0700
commitffdcd67c2522aaa369149024074ec884471399d2 (patch)
tree3f6d057fcbff0dee00a2923645fdc34a0dacabcb /src
parentRevert "Improve makefile to try to avoid wedging on failure-to-dep lib/std.rc" (diff)
downloadrust-ffdcd67c2522aaa369149024074ec884471399d2.tar.xz
rust-ffdcd67c2522aaa369149024074ec884471399d2.zip
Fix underlying failure to signal errors when dep'ing.
Diffstat (limited to 'src')
-rw-r--r--src/boot/driver/main.ml14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/boot/driver/main.ml b/src/boot/driver/main.ml
index 61d419e7..8cfe4048 100644
--- a/src/boot/driver/main.ml
+++ b/src/boot/driver/main.ml
@@ -64,6 +64,12 @@ let (sess:Session.sess) =
}
;;
+let exit_if_failed _ =
+ if sess.Session.sess_failed
+ then exit 1
+ else ()
+;;
+
let default_output_filename (sess:Session.sess) : filename option =
match sess.Session.sess_in with
None -> None
@@ -93,6 +99,7 @@ let dump_sig (filename:filename) : unit =
let items =
Lib.get_file_mod sess abi filename (ref (Node 0)) (ref (Opaque 0)) in
Printf.fprintf stdout "%s\n" (Fmt.fmt_to_str Ast.fmt_mod_items items);
+ exit_if_failed ();
exit 0
;;
@@ -202,12 +209,6 @@ let argspecs =
] @ (Glue.alt_argspecs sess)
;;
-let exit_if_failed _ =
- if sess.Session.sess_failed
- then exit 1
- else ()
-;;
-
Arg.parse
argspecs
(fun arg -> sess.Session.sess_in <- (Some arg))
@@ -255,6 +256,7 @@ let (crate:Ast.crate) =
exit 1
end
in
+ exit_if_failed();
if sess.Session.sess_report_deps
then
let outfile = (Session.filename_of sess.Session.sess_out) in