[ocaml-platform] [Caml-list] Package compilation and debug mode
Thomas Gazagnaire
thomas at gazagnaire.org
Wed Mar 23 10:02:47 GMT 2016
> By default all my packages are released with -g disabled. It seems easy enough to have an opam switch (even the official one) that automatically enables the flag.
How do you envision such a global debug flag? As far as I know, there is no configuration-time option to enable that option in the compiler (which would be the cleaner option IMHO). I'd rather avoid using OCAMLPARAM for this. A new opam variable can be created and used in the opam file to pass the debug command (or not) explicitly to the build system, but this will require adapting all the build systems (and ideally a new release of opam, but we can work-around that by setting OPAMVAR_debug in the .comp file).
> So I think OCaml's opam repository should have a policy here. The answer should also take system package managers into account since those pull directly from the tarballs (if this document [3] is still in use for debian it seems they do require compilation with debug mode).
>
> Personally I don't have an opinion about it, I'm rather seeking an answer here.
I don't have a strong opinion either. I like when packages come with -g by default, but I can understand that the (small) runtime cost can be a problem for deployment scenarios.
Thomas
More information about the Platform
mailing list