The cool features in OCaml 4.03 are adding up -- in addition to the low latency garbage collection patches, this one ensures that all of the .cmx files are always available during linking. If they are not, then cross-module inlining is currently silently turned off, but with this, we can ensure the highest performance unikernel link.
Anil > Begin forwarded message: > > From: Leo White <[email protected]> > Date: 29 November 2015 at 18:29:09 GMT > To: ocaml/ocaml <[email protected]> > Subject: [ocaml] Warning for missing .cmx files (#319) > > 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 > <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 > > M Makefile <https://github.com/ocaml/ocaml/pull/319/files#diff-0> (2) > M asmcomp/closure.ml <https://github.com/ocaml/ocaml/pull/319/files#diff-1> > (2) > M asmcomp/compilenv.ml <https://github.com/ocaml/ocaml/pull/319/files#diff-2> > (24) > M ocamldoc/Makefile <https://github.com/ocaml/ocaml/pull/319/files#diff-3> (2) > M typing/cmi_format.ml <https://github.com/ocaml/ocaml/pull/319/files#diff-4> > (4) > M typing/cmi_format.mli > <https://github.com/ocaml/ocaml/pull/319/files#diff-5> (4) > M typing/cmt_format.ml <https://github.com/ocaml/ocaml/pull/319/files#diff-6> > (9) > M typing/env.ml <https://github.com/ocaml/ocaml/pull/319/files#diff-7> (33) > M typing/env.mli <https://github.com/ocaml/ocaml/pull/319/files#diff-8> (3) > M utils/warnings.ml <https://github.com/ocaml/ocaml/pull/319/files#diff-9> (6) > M utils/warnings.mli <https://github.com/ocaml/ocaml/pull/319/files#diff-10> > (1) > Patch Links: > > https://github.com/ocaml/ocaml/pull/319.patch > <https://github.com/ocaml/ocaml/pull/319.patch> > https://github.com/ocaml/ocaml/pull/319.diff > <https://github.com/ocaml/ocaml/pull/319.diff> > — > Reply to this email directly or view it on GitHub > <https://github.com/ocaml/ocaml/pull/319>. >
_______________________________________________ MirageOS-devel mailing list [email protected] http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
