[ocaml-ctypes] Foreign function interface support

ygrek ygrek at autistici.org
Tue Mar 4 10:41:46 GMT 2014


On Tue, 4 Mar 2014 09:47:10 +0000
Anil Madhavapeddy <anil at recoil.org> wrote:

> Off the top of my head, you need something like
> 
> -cclib,-Xlinker,-cclib,--no-as-needed,-Wl
> 
> to corebuild
> 
> (see https://github.com/rgrinberg/onanomsg/blob/master/_oasis for an OASIS example)
> 
> The complication is that this will *not* work on MacOS X, since LLVM doesn't support that linker flag. C stub generation will greatly help reduce this complexity when that lands in Ctypes.

OASIS allows conditional fields, so you can have a dynamic test whether linker supports this option, that will set some
oasis flag and then test that flag with

  if flag(xxx)
    CCLib: -Xlinker --no-as-needed

hth

-- 


More information about the Ctypes mailing list