From: Xavier Leroy <xleroy@pauillac.inria.fr>
To: kgallo@microsoft.com (Kevin Gallo)
Cc: caml-list@pauillac.inria.fr
Subject: Re: Behavior of csldep
Date: Wed, 20 Mar 1996 11:06:33 +0100 (MET) [thread overview]
Message-ID: <199603201006.LAA15404@pauillac.inria.fr> (raw)
In-Reply-To: <c=US%a=_%p=msft%l=RED-81-MSG-960318221635Z-13012@red-07-imc.itg.microsoft.com> from "Kevin Gallo" at Mar 18, 96 02:16:35 pm
> When I use csldep to automatically generate dependencies for both
> bytecode and native code versions, the .cmo files are listed as
> depending on .cmi files whereas the .cmx files are listed as depending
> on the .cmx files. Is this the correct behavior and is there a
> workaround?
I'll put this in the FAQ, because it seems to puzzle many users.
.cmx files depend also on .cmx files because these files contain
information for cross-module optimizations. If a compilation unit A
calls a function in unit B, generating code from A.ml looks up
information on the called function in B.cmx.
Hence, if B.cmx changes (e.g. if B.ml is recompiled), A.ml must also
be recompiled, which is obtained by saying that A.cmx depends on
B.cmx.
Not recompiling A may cause its code to become inconsistent with
that of B. This is detected at link-time and causes an error. So, it
would not be safe to remove the dependencies between .cmx files.
On the other hand, it often happens that recompiling a .ml file does
not actually change its .cmx file (if the changes to the .ml file are
small enough), in which case no further recompilation is
needed. Unfortunately, "make" is too dumb to understand that. I have
been unable to express this kind of dependencies in a standard
Makefile. A special-purpose compilation manager is needed to minimize
the amount of recompilation necessary.
- Xavier Leroy
prev parent reply other threads:[~1996-03-20 16:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-03-18 22:16 Kevin Gallo
1996-03-20 10:06 ` Xavier Leroy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199603201006.LAA15404@pauillac.inria.fr \
--to=xleroy@pauillac.inria.fr \
--cc=caml-list@pauillac.inria.fr \
--cc=kgallo@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox