I had the same question. It doesn’t work with other preprocessors. Here’s the response. tl;dr: It would need to be implemented in ppxlib
in order to become compatible with other preprocessors, but doing so requires non-trivial amount of work.
What is holding you back from upgrading to the latest OCaml compiler?
EDIT: Apparently there’s now better support in Dune 1.10. I haven’t tested yet though. Please see diml’s post below.