aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/nativelib.ml
diff options
context:
space:
mode:
authorGravatar mdenes <mdenes@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-02-24 11:54:28 +0000
committerGravatar mdenes <mdenes@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-02-24 11:54:28 +0000
commit0a9dd11b1500455bdc98ad5769e3a572a5705d8f (patch)
tree1b37e1d06f411ab79d62c683e04505c6778fe415 /kernel/nativelib.ml
parenta19c384d3cc5b2b5539bd0df74d9e99cf95ebbc3 (diff)
Reduced the noise level when dynlinking in bytecode mode or when
-no-native-compiler flag is on. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16239 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/nativelib.ml')
-rw-r--r--kernel/nativelib.ml8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/nativelib.ml b/kernel/nativelib.ml
index 09202f6a7..46125a2c7 100644
--- a/kernel/nativelib.ml
+++ b/kernel/nativelib.ml
@@ -77,15 +77,21 @@ let compile ml_filename code =
write_ml_code ml_filename code;
call_compiler ml_filename (!get_load_paths())
+(* call_linker dynamic links code for constants in environment or a *)
+(* conversion test. Silently fails if the file does not exist in bytecode *)
+(* mode, since the standard library is not compiled to bytecode with default *)
+(* settings. *)
let call_linker ~fatal prefix f upds =
rt1 := dummy_value ();
rt2 := dummy_value ();
+ if Dynlink.is_native || Sys.file_exists f then
(try
if Dynlink.is_native then Dynlink.loadfile f else !load_obj f;
register_native_file prefix
with | Dynlink.Error e ->
let msg = "Dynlink error, " ^ Dynlink.error_message e in
if fatal then anomaly (Pp.str msg) else Pp.msg_warning (Pp.str msg)
- | _ -> let msg = "Dynlink error" in
+ | _ ->
+ let msg = "Dynlink error" in
if fatal then anomaly (Pp.str msg) else Pp.msg_warning (Pp.str msg));
match upds with Some upds -> update_locations upds | _ -> ()