parent
079d64f48c
commit
ea888074b0
|
@ -996,15 +996,25 @@ module Gen(P : Params) = struct
|
||||||
Option.iter ctx.ocamlopt ~f:(fun ocamlopt ->
|
Option.iter ctx.ocamlopt ~f:(fun ocamlopt ->
|
||||||
let src = lib_archive lib ~dir ~ext:(Mode.compiled_lib_ext Native) in
|
let src = lib_archive lib ~dir ~ext:(Mode.compiled_lib_ext Native) in
|
||||||
let dst = lib_archive lib ~dir ~ext:".cmxs" in
|
let dst = lib_archive lib ~dir ~ext:".cmxs" in
|
||||||
add_rule
|
let build =
|
||||||
(Build.run
|
Build.run
|
||||||
(Dep ocamlopt)
|
(Dep ocamlopt)
|
||||||
[ Ocaml_flags.get flags Native
|
[ Ocaml_flags.get flags Native
|
||||||
; A "-shared"; A "-linkall"
|
; A "-shared"; A "-linkall"
|
||||||
; A "-I"; Path dir
|
; A "-I"; Path dir
|
||||||
; A "-o"; Target dst
|
; A "-o"; Target dst
|
||||||
; Dep src
|
; Dep src
|
||||||
])
|
]
|
||||||
|
in
|
||||||
|
let build =
|
||||||
|
if Library.has_stubs lib then
|
||||||
|
Build.path (stubs_archive ~dir lib)
|
||||||
|
>>>
|
||||||
|
build
|
||||||
|
else
|
||||||
|
build
|
||||||
|
in
|
||||||
|
add_rule build
|
||||||
);
|
);
|
||||||
|
|
||||||
match lib.kind with
|
match lib.kind with
|
||||||
|
|
Loading…
Reference in New Issue