Skip to content

Conversation

@dbuenzli
Copy link
Contributor

This update to the library linking RFC resolves a backward compatibilty concern that was raised with the previous one. Namely the fact library dependencies embedded in archives where resolved when archives were given directly to the compiler as arguments.

In this new version when an archive is specified on the command line (or #loaded in ocaml) its library dependencies are not resolved.

In order to resolve they need to be specified via the -require option (or #require directive) which is now overloaded in certain contexts to take either a library name to be resolved in the OCAMLPATH or a direct path to an archive file.

This provides more control over which dependencies should be resolved than the -noautoliblink flag of the previous version which would disable resolution in bulk for the whole compiler invocation.

This does not change anything to the dune/ocamlfind compatibility story. However it gives more control for people which will want to use the bare compiler support in their build system (e.g. make).

Also for the tools that intepret OCAMLPATH a -L PATH option is added to allow to prepend a path to the OCAMLPATH.

Rendered markdown

@avsm
Copy link
Member

avsm commented Mar 20, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants