diff options
| author | Maxime Dénès | 2016-03-04 19:01:35 +0100 |
|---|---|---|
| committer | Maxime Dénès | 2016-03-04 19:01:35 +0100 |
| commit | 35cc038e96395b0f4eaaeed3a5a48e6da2293f7e (patch) | |
| tree | 6aadf76ea4a1e21506a075a0298ebe027efb83cd | |
| parent | 120053a50f87bd53398eedc887fa5e979f56f112 (diff) | |
Fix #4607: do not read native code files if native compiler was disabled.
| -rw-r--r-- | library/library.ml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/library/library.ml b/library/library.ml index 79e5792c02..ccda57c2c5 100644 --- a/library/library.ml +++ b/library/library.ml @@ -171,9 +171,8 @@ let register_loaded_library m = let prefix = Nativecode.mod_uid_of_dirpath libname ^ "." in let f = prefix ^ "cmo" in let f = Dynlink.adapt_filename f in - (* This will not produce errors or warnings if the native compiler was - not enabled *) - Nativelib.link_library ~prefix ~dirname ~basename:f + if not Coq_config.no_native_compiler then + Nativelib.link_library ~prefix ~dirname ~basename:f in let rec aux = function | [] -> link m; [libname] |
