|Anonymous | Login | Signup for a new account||2016-10-28 23:47 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004389||OCaml||OCaml general||public||2007-09-13 13:45||2007-11-06 16:53|
|Target Version||Fixed in Version|
|Summary||0004389: ocamldep generates cmx -> cmx dependencies|
|Description||ocamldep generates dependencies as if native separate compilation did not exist.|
That is, with the files :
let x = 1 ;;
val x : int
The command "ocamldep a.ml a.mli b.ml" generates the dependency:
The dependencies for b.cmo reflect the expected behaviour of
actual separate compilation:
If "ocamlopt" can always handle the link of a.cmx and b.cmx even if a.cmx was built
after b.cmx, this report is a feature request for a "-separate-native-compilation"
option to "ocamldep", that would generate "b.cmx : a.cmi" only in this case.
If "ocamlopt" can not always handle the link of a.cmx and b.cmx if a.cmx was built after
b.cmx (with a.cmi unchanged), this report is a feature request for making this possible,
and then adding the "-separate-native-compilation" option to ocamldep.
Native compilation is faster than bytecode for the case "make big_project regression_tests",
but separate native compilation would be even faster, because a lot of time
is spent in "make big_project" even for small changes.
|Tags||No tags attached.|
> If "ocamlopt" can always handle the link of a.cmx and b.cmx even
> if a.cmx was built after b.cmx,
Unfortunately, no. This would break cross-module optimizations -- that's the main reason why, with ocamlopt, the implementation of a module A depends on the implementations (not just the interfaces) of A's imported modules.
What you suggest would also require an ocamlopt flag to turn off cross-module optimizations, and perhaps additional link-time checks to validate mixtures of .cmx files compiled with and without cross-module optimizations. I'm not keen to implement this, as I don't see many scenarios where it would be useful.
|2007-09-13 13:45||pascal_cuoq||New Issue|
|2007-11-06 16:53||xleroy||Note Added: 0004241|
|2007-11-06 16:53||xleroy||Status||new => closed|
|2007-11-06 16:53||xleroy||Resolution||open => won't fix|
|Copyright © 2000 - 2011 MantisBT Group|