diff options
author | Damien Doligez <damien.doligez-inria.fr> | 1999-11-08 15:25:41 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 1999-11-08 15:25:41 +0000 |
commit | 05f4452887616a2a2a88dacdbfc9c4829f3967b4 (patch) | |
tree | 16aa363c0e29ef38ab7ed7c03200abf248af854a | |
parent | 979f6f2faf24829743c1c63a309a69dd17d881ee (diff) |
option -nopervasives pour le link
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2475 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | asmcomp/asmlink.ml | 19 | ||||
-rw-r--r-- | bytecomp/bytelink.ml | 3 |
2 files changed, 14 insertions, 8 deletions
diff --git a/asmcomp/asmlink.ml b/asmcomp/asmlink.ml index 4b733913a..c355f3ede 100644 --- a/asmcomp/asmlink.ml +++ b/asmcomp/asmlink.ml @@ -5,7 +5,7 @@ (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) (* *) (* Copyright 1996 Institut National de Recherche en Informatique et *) -(* Automatique. Distributed only by permission. *) +(* en Automatique. Distributed only by permission. *) (* *) (***********************************************************************) @@ -183,9 +183,11 @@ let call_linker file_list startup_file = else "libasmrun" ^ ext_lib in let runtime_lib = try - find_in_path !load_path libname + if !nopervasives then "" + else find_in_path !load_path libname with Not_found -> raise(Error(File_not_found libname)) in + let c_lib = if !nopervasives then "" else Config.c_libraries in let cmd = match Config.system with "win32" -> @@ -200,7 +202,7 @@ let call_linker file_list startup_file = (String.concat " " (List.map Ccomp.expand_libname (List.rev !Clflags.ccobjs))) runtime_lib - Config.c_libraries + c_lib else Printf.sprintf "%s /out:%s %s %s" Config.native_partial_linker @@ -220,7 +222,7 @@ let call_linker file_list startup_file = Config.standard_library (String.concat " " (List.rev !Clflags.ccobjs)) runtime_lib - Config.c_libraries + c_lib else Printf.sprintf "%s -o %s %s %s" Config.native_partial_linker @@ -246,9 +248,12 @@ let object_file_name name = let link objfiles = let objfiles = - if !Clflags.gprofile - then "stdlib.p.cmxa" :: (objfiles @ ["std_exit.p.cmx"]) - else "stdlib.cmxa" :: (objfiles @ ["std_exit.cmx"]) in + if !Clflags.nopervasives then + objfiles + else if !Clflags.gprofile then + "stdlib.p.cmxa" :: (objfiles @ ["std_exit.p.cmx"]) + else + "stdlib.cmxa" :: (objfiles @ ["std_exit.cmx"]) in let units_tolink = List.fold_right scan_file objfiles [] in Array.iter remove_required Runtimedef.builtin_exceptions; if not (StringSet.is_empty !missing_globals) then diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml index 4926f3f6c..ea78706bf 100644 --- a/bytecomp/bytelink.ml +++ b/bytecomp/bytelink.ml @@ -478,7 +478,8 @@ let fix_exec_name name = (* Main entry point (build a custom runtime if needed) *) let link objfiles = - let objfiles = "stdlib.cma" :: (objfiles @ ["std_exit.cmo"]) in + let objfiles = if !Clflags.nopervasives then objfiles + else "stdlib.cma" :: (objfiles @ ["std_exit.cmo"]) in if not !Clflags.custom_runtime then link_bytecode objfiles !Clflags.exec_name true else if not !Clflags.output_c_object then begin |