-
Notifications
You must be signed in to change notification settings - Fork 469
exposing the mt predicate to dune libraries #1724
Copy link
Copy link
Closed
Description
The ctypes port to dune (yallop/ocaml-ctypes#588) is almost working, except for the need to select which subpackage to link based on the -mt predicate in ocamlfind. #96 has some discussion of this, but the specific META file in ctypes is:
package "foreign" (
version = "0.14.0"
description = "Dynamic linking of C functions"
requires(-mt) = "ctypes.foreign.unthreaded"
requires(mt) = "ctypes.foreign.threaded"
Both the unthreaded and threaded variants have different c stubs, and cannot be linked simultaneously without a module clash. I'm not sure how to make this work without some support for mt in a dune file, as the right package is selected based on whether the executable uses the threads library or not.
Suggestions for workarounds welcome to unblock the ctypes port...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels