Install c/cxx stubs for virtual libraries

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-08-30 14:36:03 +03:00
parent 44ca7f0bbf
commit 1ded621dc7
1 changed files with 6 additions and 1 deletions

View File

@ -164,8 +164,13 @@ module Gen(P : Params) = struct
| Some f -> Some f.path)
])
; if_ (byte && not virtual_library) [ Library.archive ~dir lib ~ext:".cma" ]
; if_ (Library.has_stubs lib && not virtual_library)
; if virtual_library then (
(lib.c_names @ lib.cxx_names)
|> List.map ~f:(fun (_, c) -> Path.relative dir (c ^ ext_obj))
) else if Library.has_stubs lib then (
[ Library.stubs_archive ~dir lib ~ext_lib:ctx.ext_lib ]
) else
[]
; if_ (native && not virtual_library)
(let files =
[ Library.archive ~dir lib ~ext:".cmxa"