samoht / assemblage

A collection of tools to manage the configuration of OCaml projects
54 stars 4 forks source link

Handle build product extensions and C compiler invocation correctly on windows #177

Closed dbuenzli closed 4 years ago

dbuenzli commented 9 years ago

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:

Besides the rules for compiling C should be adapted if c-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.