Hi Marc!
Marc Piulachs wrote:
But it's a fact that we want to support at least 3 compilers (for now) msvc , gcc and winebuild
Don't see winebuild as a compiler! Wine also needs to create export definitions for many different compilers and actually winebuild is their solution to this problem. It processes .spec files, which also just contain information about each export and it can convert them to different output formats (which are then processed by a real compiler).
Currently, we only make use of the .def file output of winebuild, but the generated .def files are MinGW-only, so if we want to use .spec files, we would need to implement MSVC .def file support in winebuild. But as winebuild supports many more options and output formats we don't use and will probably never use, I proposed a rewrite of it for our purposes, which should be a relatively easy task and result in a more lightweight tool.
So, if we would use .spec files for export definitions * we just need to add MSVC .def file output to winebuild (or create an own tool with MinGW .def and MSVC .def output) * we need to convert all existing .def files, but can leave the already existing .spec files untouched * we use the same format Wine also uses for their export definitions. Therefore Wine modules can just be imported and don't require further changes in the export definition files.
If we would use the .rbuild method you proposed * we need to work out a completely new format for export definitions in rbuild's XML files and add MinGW .def and MSVC .def file generation to rbuild. * we need to convert all existing .def *and* .spec files to the new XML format * we invent yet another format for defining exports. Wine modules cannot also just be imported, because we need to convert their .spec files to the XML format everytime then.
An advantage of your proposed .rbuild solution might be that we can use the rbuild conditional logic, but I don't know how important this really is. Your example lib/debugsup/debugsup.rbuild just uses the same export definition file for two modules, I don't consider this a hack.
Just my two cents.
Regards,
Colin