Skip to content

Commit

Permalink
Clean up some duplicate obj dir handling
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed Sep 30, 2020
1 parent 1db8855 commit c231128
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/dune_rules/install_rules.ml
Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,12 @@ end = struct
| None -> f
| Some d -> Filename.concat d f
in
let cmi_dir =
(* TODO we should get this from the external obj dir *)
let public_cmi_dir =
match Lib_info.status info with
| Private (_, Some _) -> Some (inside_subdir ".public_cmi")
| _ -> lib_subdir
in
let private_cmi_dir = inside_subdir ".private" in
function
| Visibility.Public -> public_cmi_dir
| Private -> Some private_cmi_dir
let external_obj_dir =
Obj_dir.convert_to_external obj_dir ~dir:(Path.build dir)
in
let cmi_dir visibility =
Obj_dir.cm_dir external_obj_dir Cmi visibility
|> Path.basename |> inside_subdir |> Option.some
in
let virtual_library = Library.is_virtual lib in
List.concat_map installable_modules ~f:(fun m ->
Expand Down

0 comments on commit c231128

Please sign in to comment.