New configuration keys need to be introduced for this.
At least one new c-comp-type configuration key is needed to handle windows correctly. This should be a key that holds either cc or msvc and essentially mirrors what the ocamlc -config | grep comp_type provides.
For each product extension we should provide a configuration key whose default value depends on c-comp-type (should we keep them private in order not to bloat the user visible configuration options too much ?) as follows:
If c-comp-type = msvc, then .obj, .lib, .dll, .exe.
If c-comp-type = cc
If host-os = win32 (basically this means mingw), then .o, .a, .dll, .exe
Otherwise, .o, .a, .so,
Besides the rules for compiling C should be adapted if c-comp-type=msvc, see for example:
New configuration keys need to be introduced for this.
At least one new
c-comp-type
configuration key is needed to handle windows correctly. This should be a key that holds eithercc
ormsvc
and essentially mirrors what theocamlc -config | grep comp_type
provides.For each product extension we should provide a configuration key whose default value depends on
c-comp-type
(should we keep them private in order not to bloat the user visible configuration options too much ?) as follows:c-comp-type = msvc
, then.obj
,.lib
,.dll
,.exe
.c-comp-type = cc
host-os = win32
(basically this means mingw), then.o
,.a
,.dll
,.exe
.o
,.a
,.so
,Besides the rules for compiling
C
should be adapted ifc-comp-type=msvc
, see for example:https://github.com/dra27/opam/blob/0130db82f6bc49245b164d3136308531d96c786c/configure.ac#L85-L100 https://github.com/dra27/opam/blob/0130db82f6bc49245b164d3136308531d96c786c/src/Makefile#L276
Related to #127.
Thanks to @dra27 for helping me clarifying this.