This patch adds a warning for missing cmx files during cross-module inlining. This is useful because currently a misspecified build can silently damage the performance of programs.
The patch also extends the -opaque
option to work on .mli files. Using -opaque
on an .ml file means that its implementation should not be considered for cross-module inlining. Using -opaque
on an .mli file means that no implementation of that interface should be considered for cross-module inlining.
If an interface is marked as opaque
then the compiler does not search for a .cmx file, and so the new warning will not be triggered. This means that modules which are intended to be chosen at link-time (and so deliberately hide .cmx files) can avoid unnecessarily triggering the warning.
As an illustration of the utility of this new warning, not all cmx files were installed by the OCaml distribution, and the patch also adjusts the installation rules to install these files (which were in compiler-libs and ocamldoc).
You can view, comment on, or merge this pull request online at:
https://github.com/ocaml/ocaml/pull/319
Commit Summary
- Add warning for missing .cmx files
- Install compiler libs .cmx files
- Install ocamldoc .cmx files
File Changes
Patch Links:
â
Reply to this email directly or view it on GitHub.