From 8873f049b3ac2ee604ccfaacd6ca8abc490feb7e Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 10 Dec 2023 21:38:07 -0700 Subject: [PATCH] fix(pkg): allow OCAMLFIND_TOOLCHAIN to be set per context Signed-off-by: Rudi Grinberg --- src/dune_rules/context.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dune_rules/context.ml b/src/dune_rules/context.ml index 90d1dee3b45b..29d69c060ecc 100644 --- a/src/dune_rules/context.ml +++ b/src/dune_rules/context.ml @@ -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 -> @@ -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