From 3c785936a0b56623f7c3512fa861a7a9823ad495 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Wed, 3 Apr 2019 18:38:10 +0200 Subject: Better error message when OCaml compiler not found for native compute Fixes #6699 --- library/library.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'library') diff --git a/library/library.ml b/library/library.ml index 37dadadb76..04e38296d9 100644 --- a/library/library.ml +++ b/library/library.ml @@ -718,8 +718,7 @@ let save_library_to ?todo ~output_native_objects dir f otab = (* Writing native code files *) if output_native_objects then let fn = Filename.dirname f'^"/"^Nativecode.mod_uid_of_dirpath dir in - if not (Nativelib.compile_library dir ast fn) then - user_err Pp.(str "Could not compile the library to native code.") + Nativelib.compile_library dir ast fn with reraise -> let reraise = CErrors.push reraise in let () = Feedback.msg_warning (str "Removed file " ++ str f') in -- cgit v1.2.3