Passing extra CFLAGS to the ocaml compilers

Is there an “official” interface to pass extra CFLAGS to the ocaml compilers?

I just realized neither the old ocaml.git#trunk:configure nor the new ocaml.git#trunk:configure.ac ever considered CFLAGS. Nor does any option exist to stuff more required compiler flags into configure.ac:common_cflags, just so that every package will automatically use it.

In my case I have to pass -fno-lto to all packages which do not build with dune, which is (as of now) just pyml and stdcompat.

Passing -Werror=implicit-function-declaration would be also desirable…

I mean, I can certainly hack around the lack of --extra-cflags myself. Just wondering why it does not exist.

I think you may be in luck :slight_smile: I just checked and both seem to have dune files in their repos:

This is true. Unfortunately this does not mean both can be built with dune, at least it fails for me.