Changing build flags without modifying the dune file?

jbuilder
dune

#1

When packaging OCaml libs that use dune for the Linux distros, I want to change the flags being used (e.g. add -g for including debug symbols). Is there any unobtrusive solution that doesn’t require modifying the jbuilder/dune file?


#2

Have you tried setting OCAMLPARAM? Note that unless the package explicitly sets the compilation flags and doesn’t inherit the default ones, -g is part of the default flags that are passed by dune to the compiler.


#3

The proposal here https://github.com/ocaml/dune/issues/1053 should give you some level of control for the flags.