aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2015-02-04 11:30:56 +0100
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2015-02-04 11:30:56 +0100
commitd82daa51c47db9e9fdc24af74fb18d55e4adbc57 (patch)
tree44539e60c5bd104cc6f51e2b1a1c5426c1dcd2d6 /kernel
parent8524f80ad30b744b66186cf59aec8d2524490da7 (diff)
Nativelib: catch Unix_error (like no ocamlopt found)
Diffstat (limited to 'kernel')
-rw-r--r--kernel/nativelib.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/nativelib.ml b/kernel/nativelib.ml
index dd47bc06a..605c1225c 100644
--- a/kernel/nativelib.ml
+++ b/kernel/nativelib.ml
@@ -77,7 +77,10 @@ let call_compiler ml_filename =
::include_dirs
@ ["-impl"; ml_filename] in
if !Flags.debug then Pp.msg_debug (Pp.str (compiler_name ^ " " ^ (String.concat " " args)));
- CUnix.sys_command compiler_name args = Unix.WEXITED 0, link_filename
+ try CUnix.sys_command compiler_name args = Unix.WEXITED 0, link_filename
+ with Unix.Unix_error (e,_,_) ->
+ Pp.(msg_warning (str (Unix.error_message e)));
+ false, link_filename
let compile fn code =
write_ml_code fn code;