summaryrefslogtreecommitdiff
path: root/driver/optcompile.ml
diff options
context:
space:
mode:
authorPierre Chambart <pierre.chambart@ocamlpro.com>2016-06-02 14:38:33 +0200
committerPierre Chambart <pierre.chambart@ocamlpro.com>2016-07-08 16:02:26 +0200
commit7286a4978fa2f1552612a93eed1b687336c4fb5e (patch)
treec055f19a617c53258d431ff58a5fc9165c4f1094 /driver/optcompile.ml
parentc822b5a73ed43c0104f04178355bb2e6fa612e37 (diff)
downloadocaml-7286a4978fa2f1552612a93eed1b687336c4fb5e.tar.gz
Allow to force linking modules without generating dummy code
Diffstat (limited to 'driver/optcompile.ml')
-rw-r--r--driver/optcompile.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/driver/optcompile.ml b/driver/optcompile.ml
index 00e424bc0f..df6e7e0fad 100644
--- a/driver/optcompile.ml
+++ b/driver/optcompile.ml
@@ -62,6 +62,7 @@ let print_if ppf flag printer arg =
let (++) x f = f x
let (+++) (x, y) f = (x, f y)
+let (++|+) (x, y, z) f = (x, y, f z)
let implementation ppf sourcefile outputprefix ~backend =
let source_provenance = Timings.File sourcefile in
@@ -93,9 +94,10 @@ let implementation ppf sourcefile outputprefix ~backend =
(typedtree, coercion)
++ Timings.(time (Timings.Transl sourcefile)
(Translmod.transl_implementation_flambda modulename))
- +++ print_if ppf Clflags.dump_rawlambda Printlambda.lambda
- ++ Timings.time (Timings.Generate sourcefile) (fun lambda ->
- lambda
+ ++|+ print_if ppf Clflags.dump_rawlambda Printlambda.lambda
+ ++ Timings.time (Timings.Generate sourcefile)
+ (fun (modu, required_globals, body) ->
+ (modu, body)
+++ Simplif.simplify_lambda
+++ print_if ppf Clflags.dump_lambda Printlambda.lambda
++ (fun ((module_ident, size), lam) ->
@@ -107,7 +109,7 @@ let implementation ppf sourcefile outputprefix ~backend =
~backend
~module_initializer:lam)
++ Asmgen.compile_implementation_flambda ~source_provenance
- outputprefix ~backend ppf;
+ outputprefix ~required_globals ~backend ppf;
Compilenv.save_unit_info cmxfile)
end
else begin