Skip to content

Commit

Permalink
dune top: include directories to find dlls
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolás Ojeda Bär <[email protected]>
  • Loading branch information
nojb committed Feb 16, 2021
1 parent 16e64f6 commit 5ebe000
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/top.ml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ let term =
Dune_rules.Lib.closure ~linking:true libs |> Result.ok_exn
in
let include_paths =
Dune_rules.Lib.L.include_paths requires Dune_engine.Mode.Byte
let requires_with_dlls =
List.filter requires ~f:(fun t ->
let info = Dune_rules.Lib.info t in
Dune_rules.Lib_info.foreign_dll_files info <> [])
in
Path.Set.union
(Dune_rules.Lib.L.include_paths requires Dune_engine.Mode.Byte)
(Dune_rules.Lib.L.c_include_paths requires_with_dlls)
in
let files = link_deps requires in
let* () =
Expand Down
2 changes: 2 additions & 0 deletions src/dune_rules/lib.mli
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ module L : sig

val include_flags : ?project:Dune_project.t -> t -> Mode.t -> _ Command.Args.t

val c_include_paths : t -> Path.Set.t

val c_include_flags : t -> _ Command.Args.t

val compile_and_link_flags :
Expand Down

0 comments on commit 5ebe000

Please sign in to comment.