diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2008-10-08 13:09:39 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2008-10-08 13:09:39 +0000 |
commit | 2b0441401a9686529cfe8d97cf73ecc09a51bef5 (patch) | |
tree | 1e1bf18bb6810b34696e0e4329a60c3f6c1bcabb /driver/optcompile.ml | |
parent | 29e590ccb9fe1a9330a6809a972a0e84e80653f7 (diff) |
merge changes between 3.10.2 and the end of branch 3.10
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9079 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'driver/optcompile.ml')
-rw-r--r-- | driver/optcompile.ml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/driver/optcompile.ml b/driver/optcompile.ml index 0aa947953..240427ca3 100644 --- a/driver/optcompile.ml +++ b/driver/optcompile.ml @@ -113,6 +113,8 @@ let implementation ppf sourcefile outputprefix = let inputfile = Pparse.preprocess sourcefile in let env = initial_env() in Compilenv.reset ?packname:!Clflags.for_package modulename; + let cmxfile = outputprefix ^ ".cmx" in + let objfile = outputprefix ^ ext_obj in try if !Clflags.print_types then ignore( Pparse.file ppf inputfile Parse.implementation ast_impl_magic_number @@ -129,11 +131,13 @@ let implementation ppf sourcefile outputprefix = +++ Simplif.simplify_lambda +++ print_if ppf Clflags.dump_lambda Printlambda.lambda ++ Asmgen.compile_implementation outputprefix ppf; - Compilenv.save_unit_info (outputprefix ^ ".cmx"); + Compilenv.save_unit_info cmxfile; end; Warnings.check_fatal (); Pparse.remove_preprocessed inputfile with x -> + remove_file objfile; + remove_file cmxfile; Pparse.remove_preprocessed_if_ast inputfile; raise x |