Skip to content

Commit

Permalink
fix after rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Hugo Heuzard <[email protected]>
  • Loading branch information
hhugo committed Dec 2, 2021
1 parent 22f2c97 commit 79766aa
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/dune_rules/super_context.ml
Original file line number Diff line number Diff line change
Expand Up @@ -404,23 +404,17 @@ let foreign_flags t ~dir ~expander ~flags ~language =

let link_flags t ~dir ~expander ~use_standard_c_and_cxx_flags ~flags =
let env_tree = t.env_tree in
let default_from_env =
let default =
get_node env_tree ~dir >>| Env_node.link_flags |> Action_builder.memo_build_join
in
let default_extra =
let default =
if use_standard_c_and_cxx_flags
then
let open Action_builder.O in
let+flags = Cxx_flags.get_flags ~for_:Link dir in
List.concat_map flags ~f:(fun f -> [ "-cclib"; f ])
else Action_builder.return []
in
let default =
let open Action_builder.O in
let+ default_from_env = default_from_env
and+ default_extra = default_extra
in
default_from_env @ default_extra
let+ default = default
and+ flags = Cxx_flags.get_flags ~for_:Link dir in
default @ List.concat_map flags ~f:(fun f -> [ "-cclib"; f ])
else default
in
Action_builder.memoize "link flags"
(Expander.expand_and_eval_set expander flags ~standard:default)
Expand Down

0 comments on commit 79766aa

Please sign in to comment.