Fix incremental compilation with ppx's

Same fix as 6a3c51c358 but also for ppx's
This commit is contained in:
Rudi Grinberg 2017-11-27 21:14:24 +08:00
parent 511801c0d7
commit 6f498db212
1 changed files with 8 additions and 1 deletions

View File

@ -791,7 +791,14 @@ module PP = struct
add_rule sctx
(libs
>>>
Build.dyn_paths (Build.arr (Lib.archive_files ~mode ~ext_lib:ctx.ext_lib))
Build.dyn_paths (Build.arr (fun libs ->
List.rev_append
(Lib.archive_files ~mode ~ext_lib:ctx.ext_lib libs)
(List.filter_map libs ~f:(function
| Lib.Internal (dir, lib) ->
Some (Path.relative dir (lib.name ^ ctx.ext_lib))
| External _ ->
None))))
>>>
Build.run ~context:ctx (Ok compiler)
[ A "-o" ; Target target