ocaml / ocaml/dune

Disabling building of shared libraries for C stubs

Open
#3,876 2 comments 0 reactions 1 assignee View on GitHub

@voodoos is already working on this.

Since Oct 21, 2020.

enhancement
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

Desired Behavior

I would like to have a mechanism to prevent dune from building a .so shared library even if my OCaml installation would support this. My problem is that I have some external C libraries build with -fno-pic which I use in my stubs which prevent a shared library from being built.

I think one could reuse the no_dynlink field from the library stanza for this.

Example

For example the following should work:

(library
 (name foo)
 (modules foo)
 (no_dynlink)
 (foreign_stubs 
    (language c)
    (names stub) 
    (flags -fno-pic)))

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.