Skip to content

Commit fe3737e

Browse files
committed
[coq] Display coq env flags in dune printenv
Signed-off-by: Emilio Jesus Gallego Arias <e+git@x80.org>
1 parent c07c42f commit fe3737e

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ Unreleased
153153
- Fix `root_module` when used with preprocessing (#4683, fixes #4682,
154154
@rgrinberg, @CraigFe)
155155

156+
- Display Coq profile flags in `dune printenv` (#4767, @ejgallego)
157+
156158
2.9.0 (unreleased)
157159
------------------
158160

src/dune_rules/super_context.ml

+6-1
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ let dump_env t ~dir =
402402
let ocaml_flags = get_node t ~dir >>= Env_node.ocaml_flags in
403403
let foreign_flags = get_node t ~dir >>| Env_node.foreign_flags in
404404
let menhir_flags = get_node t ~dir >>| Env_node.menhir_flags in
405+
let coq_flags = get_node t ~dir >>= Env_node.coq in
405406
let open Action_builder.O in
406407
let+ o_dump =
407408
let* ocaml_flags = Action_builder.memo_build ocaml_flags in
@@ -417,8 +418,12 @@ let dump_env t ~dir =
417418
let+ flags = Action_builder.memo_build_join menhir_flags in
418419
[ ("menhir_flags", flags) ]
419420
|> List.map ~f:Dune_lang.Encoder.(pair string (list string))
421+
and+ coq_dump =
422+
let+ flags = Action_builder.memo_build_join coq_flags in
423+
[ ("coq_flags", flags) ]
424+
|> List.map ~f:Dune_lang.Encoder.(pair string (list string))
420425
in
421-
List.concat [ o_dump; c_dump; menhir_dump ]
426+
List.concat [ o_dump; c_dump; menhir_dump; coq_dump ]
422427

423428
let resolve_program t ~dir ?hint ~loc bin =
424429
let t = t.env_tree in

test/blackbox-tests/test-cases/workspaces.t/run.t

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Workspaces also allow you to set the env for a context:
4949
(c_flags ())
5050
(cxx_flags ())
5151
(menhir_flags ())
52+
(coq_flags (-q))
5253

5354
$ dune build --root multiple-merlin-contexts
5455
Entering directory 'multiple-merlin-contexts'

0 commit comments

Comments
 (0)