Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ocamldep problem with .cmo vs .cmx
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <frisch@c...>
Subject: Re: [Caml-list] ocamldep problem with .cmo vs .cmx
On Wed, 7 Aug 2002, Henri Dubois-Ferriere wrote:

> So the question is:
> In the example above, why doesn't ocamldep output
> main.cmo: mylib.cmo
> instead of
> main.cmo: mylib.cmi

Because you don't need to rebuild main.cmo when you change the
implementation of Mylib (the link between the two modules is
resolved at ... link time). Native-code compilation performs
some cross-modules optimizations (not sure, but probably constant
propagation and function inlining), which need the implementation of
Mylib when you compile main.ml. Hence the difference.

Anyway, you have to specify even on ocamlopt command line the full
list of .cmx files you want to put in the result. So it's not a big
deal to have the list of .cmo/.cmx files in the dependencies.


-- Alain

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners