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
While virtual libraries are a great mechanism to support conditional compilation, and Melange already supports them, sometimes it is useful to introduce branching at the module level.
For example, cppo allows to check for defined values to conditionally compile some code.
Some other analog rule would be defined for native, but without the -D MELANGE part.
Unfortunately at the moment, it is not possible to express from a dune file which rules are applied only for Melange targets, or only for OCaml targets.
A similar feature was added for foreign stubs in #5649.
Desired Behavior
While virtual libraries are a great mechanism to support conditional compilation, and Melange already supports them, sometimes it is useful to introduce branching at the module level.
For example, cppo allows to check for defined values to conditionally compile some code.
One could generate a cppo rule like:
Some other analog rule would be defined for native, but without the
-D MELANGE
part.Unfortunately at the moment, it is not possible to express from a
dune
file which rules are applied only for Melange targets, or only for OCaml targets.A similar feature was added for foreign stubs in #5649.
cc @davesnx @anmonteiro
The text was updated successfully, but these errors were encountered: