From 0a9dd11b1500455bdc98ad5769e3a572a5705d8f Mon Sep 17 00:00:00 2001 From: mdenes Date: Sun, 24 Feb 2013 11:54:28 +0000 Subject: 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 --- kernel/nativelib.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'kernel/nativelib.ml') 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 | _ -> () -- cgit v1.2.3