Skip to content

Commit

Permalink
NOT WORKING: cc and cxx variables should depend on c_flags and cxx_flags
Browse files Browse the repository at this point in the history
Signed-off-by: Greta Yorsh <[email protected]>
  • Loading branch information
gretay-js committed Feb 15, 2019
1 parent a98b830 commit 675a0cd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/super_context.ml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,15 @@ end = struct
~default_context_flags
end

let expander = Env.expander
let expander t ~dir=
let strings s = Pform.Var.Values (Value.L.strings s) in
let bindings =
Pform.Map.of_list_exn
[
"cc" , strings (t.context.c_compiler :: (Env.c_flags t ~dir))
; "cxx", strings (t.context.c_compiler :: (Env.cxx_flags t ~dir))
] in
Expander.add_bindings (Env.expander t ~dir) ~bindings

let add_rule t ?sandbox ?mode ?locks ?loc ~dir build =
let build = Build.O.(>>>) build t.chdir in
Expand Down Expand Up @@ -245,7 +253,7 @@ let partial_expand sctx ~dep_kind ~targets_written_by_user ~map_exe


let ocaml_flags t ~dir (x : Buildable.t) =
let expander = Env.expander t ~dir in
let expander = expander t ~dir in
Ocaml_flags.make
~flags:x.flags
~ocamlc_flags:x.ocamlc_flags
Expand Down

0 comments on commit 675a0cd

Please sign in to comment.