Skip to content

Commit

Permalink
fix(pkg): allow OCAMLFIND_TOOLCHAIN to be set per context
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>

<!-- ps-id: a6ad2b8a-0a50-4946-9ac7-a73c527380de -->
  • Loading branch information
rgrinberg committed Dec 11, 2023
1 parent 2245ee2 commit 8873f04
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dune_rules/context.ml
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ module Group = struct
val instantiate : Context_name.t -> t Memo.t
end = struct
let instantiate_impl name : t Memo.t =
let env = Global.env () in
let* workspace = Workspace.workspace () in
let context =
List.find_exn workspace.contexts ~f:(fun ctx ->
Expand Down Expand Up @@ -602,7 +601,7 @@ module Group = struct
match builder.findlib_toolchain with
| Some _ -> builder
| None ->
(match Env.get env "OCAMLFIND_TOOLCHAIN" with
(match Env.get builder.env "OCAMLFIND_TOOLCHAIN" with
| None -> builder
| Some name ->
{ builder with
Expand Down

0 comments on commit 8873f04

Please sign in to comment.