From d805f2e98498b3305b35d4899226c084958e02c4 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Sat, 24 Sep 2005 16:28:21 +0000 Subject: [PATCH] Si aucun module d'un .cma est utilise, ne pas linker les bibliotheques C specifiees dans le .cma (PR#3556) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7078 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02 --- bytecomp/bytelink.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml index 31576ce76..4003291ce 100644 --- a/bytecomp/bytelink.ml +++ b/bytecomp/bytelink.ml @@ -133,7 +133,6 @@ let scan_file obj_name tolink = seek_in ic pos_toc; let toc = (input_value ic : library) in close_in ic; - add_ccobjs toc; let required = List.fold_right (fun compunit reqd -> @@ -147,6 +146,7 @@ let scan_file obj_name tolink = end else reqd) toc.lib_units [] in + if required <> [] || !Clflags.link_everything then add_ccobjs toc; Link_archive(file_name, required) :: tolink end else raise(Error(Not_an_object_file file_name))