diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2001-11-27 13:47:13 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2001-11-27 13:47:13 +0000 |
commit | 2e5daf9baddd491789abfc3066818eded910bda0 (patch) | |
tree | 39ba7fe9d3dc78cebe297d858de5b07a2ffeefe7 | |
parent | 3a30d972316e96f611dd7f191b6c9a4c128fa147 (diff) |
Avec -output-obj, ne pas executer les fonctions at_exit, car ca peut invalider des callbacks C->Caml apres (PR#525)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4052 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | asmcomp/asmlink.ml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/asmcomp/asmlink.ml b/asmcomp/asmlink.ml index 15ae74366..2ea2dc00e 100644 --- a/asmcomp/asmlink.ml +++ b/asmcomp/asmlink.ml @@ -271,13 +271,14 @@ let object_file_name name = (* Main entry point *) let link ppf objfiles = + let stdlib = + if !Clflags.gprofile then "stdlib.p.cmxa" else "stdlib.cmxa" in + let stdexit = + if !Clflags.gprofile then "std_exit.p.cmx" else "std_exit.cmx" in let objfiles = - 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 + if !Clflags.nopervasives then objfiles + else if !Clflags.output_c_object then stdlib :: objfiles + else stdlib :: (objfiles @ [stdexit]) in let units_tolink = List.fold_right scan_file objfiles [] in Array.iter remove_required Runtimedef.builtin_exceptions; begin match extract_missing_globals() with |