Add self_build_stubs_archive to v1

This commit is contained in:
Jeremie Dimino 2017-03-07 13:21:54 +00:00
parent d5d861b40c
commit 7e36b3cd86
2 changed files with 8 additions and 1 deletions

View File

@ -375,6 +375,12 @@ the library and you are free to expose only the modules you want.
=bar=, you should typically write =-lbar= here, or whatever flags
are necessary to to link against this library.
- =(self_build_stubs_archive <c-libname>)= indicates to Jbuilder that
the library has stubs, but that the stubs are built manually. The
aim of the field is to embed a library written in foreign language
and/or building with another build system. It is not for casual
uses, see the [[https://github.com/janestreet/re2][re2 library]] for an example of use
Note that when binding C libraries, Jbuilder doesn't provide special
support for tools such as =pkg-config=, however it integrates easily
with [[https://github.com/janestreet/configurator][configurator]] by using =(c_flags (:include ...))= and

View File

@ -435,6 +435,7 @@ module Library = struct
field "kind" Kind.t ~default:Kind.Normal >>= fun kind ->
field "wrapped" bool ~default:true >>= fun wrapped ->
field_b "optional" >>= fun optional ->
field "self_build_stubs_archive" (option string) ~default:None >>= fun self_build_stubs_archive ->
return
{ name
; public
@ -450,7 +451,7 @@ module Library = struct
; includes = []
; library_flags
; c_library_flags
; self_build_stubs_archive = None
; self_build_stubs_archive
; js_of_ocaml
; virtual_deps
; wrapped