Le jeudi, 23 juillet 2015 à 19:55, David Allsopp a écrit :
> utils/config.mlp shows that the output will be the CCOMPTYPE variable OCaml 
> was configured with; config/Makefile.{msvc,msvc64,mingw,mingw64} show that is 
> "msvc" for the first two and "cc" for the second two.

Thanks very much, that's useful information on where to look at things.

> Additionally, while new code out there may be taking advantage of Sys.win32, 
> I expect there's a lot of code still reasonably expecting that Sys.os_type = 
> "Win32" will work forever.
I'm not suggesting to change that in OCaml I'm suggesting that for the *opam* 
os variable so that build systems can condition on it an behave accordingly. 
The opam os variable is already quite different from Sys.os_type which is not 
precise enough, see [1].
  
> Adding Sys.comp_type would be handy, of course... but then having the entire 
> Config module as Sys.Config would be generally quite useful!

As already mentioned that doesn't help much in cross-compiling scenarios.
  
> I'm not sure what you're getting at here - what build system differences are 
> you referring to?

Well the build system needs to adapt file extensions for one thing (which is 
quite annoying). Hence my question is it *only this* that differs in the mingw 
and msvc ports or are there also other differences at the build level (e.g. 
build rules) as if this is the case it would make sense to distinguish the 
ports using the os variable in order to have a good bulk variable to condition 
on, otherwise, if it's only the file extensions I don't think it's worth it.

Best,

Daniel

[1] 
https://github.com/ocaml/opam-depext/blob/d94f9f06e1d489dc4f946fb3aa37589eb9e9a2ec/depext.ml#L62-L74


_______________________________________________
opam-devel mailing list
[email protected]
http://lists.ocaml.org/listinfo/opam-devel

Reply via email to