Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004389OCaml~DO NOT USE (was: OCaml general)public2007-09-13 13:452007-11-06 16:53
Assigned To 
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version3.10.0 
Target VersionFixed in Version 
Summary0004389: ocamldep generates cmx -> cmx dependencies
Descriptionocamldep generates dependencies as if native separate compilation did not exist.
That is, with the files :
let x = 1 ;;
val x : int
print_int A.x

The command "ocamldep a.mli" generates the dependency:
b.cmx: a.cmx

The dependencies for b.cmo reflect the expected behaviour of
actual separate compilation:
b.cmo: a.cmi

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.

Rationale :

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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
xleroy (administrator)
2007-11-06 16:53

> 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.

- Issue History
Date Modified Username Field Change
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
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker