Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update library linking proposal. #17

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

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

rfcs/ocamlib.md Show resolved Hide resolved
rfcs/ocamlib.md Show resolved Hide resolved
rfcs/ocamlib.md Show resolved Hide resolved
rfcs/ocamlib.md Outdated Show resolved Hide resolved
@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