You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4389 Reporter: pascal_cuoq Status: closed (set by @xavierleroy on 2007-11-06T15:53:39Z) Resolution: won't fix Priority: normal Severity: feature Version: 3.10.0 Category: ~DO NOT USE (was: OCaml general)
Bug description
ocamldep generates dependencies as if native separate compilation did not exist.
That is, with the files :
a.ml:
let x = 1 ;;
a.mli:
val x : int
b.ml:
print_int A.x
The command "ocamldep a.ml a.mli b.ml" 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.
The text was updated successfully, but these errors were encountered:
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.
Original bug ID: 4389
Reporter: pascal_cuoq
Status: closed (set by @xavierleroy on 2007-11-06T15:53:39Z)
Resolution: won't fix
Priority: normal
Severity: feature
Version: 3.10.0
Category: ~DO NOT USE (was: OCaml general)
Bug description
ocamldep generates dependencies as if native separate compilation did not exist.
That is, with the files :
a.ml:
let x = 1 ;;
a.mli:
val x : int
b.ml:
print_int A.x
The command "ocamldep a.ml a.mli b.ml" 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.
The text was updated successfully, but these errors were encountered: