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

Expose more ocamlfind options as tags #6702

Closed
vicuna opened this issue Dec 10, 2014 · 3 comments
Closed

Expose more ocamlfind options as tags #6702

vicuna opened this issue Dec 10, 2014 · 3 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Dec 10, 2014

Original bug ID: 6702
Reporter: @whitequark
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2016-12-07T10:37:12Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.03.0+dev / +beta1
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: @gasche

Bug description

Specifically I need this for a peculiar toplevel extension:

ocamlc -a -linkpkg -dontlink compiler-libs.common ...

linkpkg and dontlink(...) could be exported as flags:

flag ["ocaml"; "link"; "linkpkg"] & A"-linkpkg";
pflag ["ocaml"; "link"] "dontlink" (fun pkg -> S[A"-dontlink"; A pkg]);
@vicuna
Copy link
Author

vicuna commented Dec 13, 2014

Comment author: @gasche

If I'm not mistaken, -linkpkg and -dontlink are ocamlfind options, not ocamlc options. -linkpkg is added automatically at link-time when -use-ocamlfind is passed, so your first "flag" comment seems subsumed by what's already there:

https://github.com/ocaml/ocaml/blob/trunk/ocamlbuild/ocaml_specific.ml#L559-L561

The -dontlink pflag looks like an excellent idea.

Could you confirm that the -linkpkg one is unnecessary, or explain why you need it?

@vicuna
Copy link
Author

vicuna commented Dec 13, 2014

Comment author: @whitequark

What I wanted is to make a cma that includes cmas from other packages. Passing linkpkg to ocamlc -a explicitly does exactly this.

I have since used a different implementation, however it might still be useful.

@vicuna
Copy link
Author

vicuna commented Dec 14, 2014

Comment author: @gasche

Implemented in trunk.

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

No branches or pull requests

2 participants