You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, flags allow to set both OCaml and Melange flags. But if one wants to set flags for either Melange or OCaml libraries in a shared code setup, it's not possible:
For OCaml only flags, one can set ocamlc_flags combined with ocamlopt_flags
For Melange only flags, it is not possible
It would be nice to have a way to define flags conditionally, e.g. (flags (if (<> %{modes} melange) ...)). Or alternatively, leave flags only for OCaml compilation, and add a new field melange_flags.
The text was updated successfully, but these errors were encountered:
For OCaml only flags, one can set ocamlc_flags combined with ocamlopt_flags
At the moment, Melange inherits the flags set for byte compilation (see related PR #6548). So there is no way to set flags for byte compilation without setting them for Melange as well.
I think it could be useful in the future to have this kind of ability. A way to fix this could be:
Add new flag melc_flags that would only apply to Melange
Stop inheriting flags from ocamlc_flags in Melange compilation
Leave flags behavior as it currently is: it would affect all melange, byte and native compilation
This should be much easier to implement than the conditionally enabled flags mentioned earlier.
Currently,
flags
allow to set both OCaml and Melange flags. But if one wants to set flags for either Melange or OCaml libraries in a shared code setup, it's not possible:ocamlc_flags
combined withocamlopt_flags
It would be nice to have a way to define flags conditionally, e.g.
(flags (if (<> %{modes} melange) ...))
. Or alternatively, leaveflags
only for OCaml compilation, and add a new fieldmelange_flags
.The text was updated successfully, but these errors were encountered: