Developer forums (C::B DEVELOPMENT STRICTLY!) > Compiler Framework Redesign
Compiler framework redesign (?)
PChris:
I just want to add my thoughts to the new Compiler Framework.
I think we could go with a structure like this:
In a separate directory we could put the XML files for the toolset (MinGW, Intel, Microsoft, ...):
--- Code: (xml) ---<toolset>
<code>MinGW</code>
<compiler>
<code>gcc</code>
<version>4.1.0</version>
...
</compiler>
<rescomp>
<code>windres</code>
<version>...</version>
</rescomp>
... other tools in the toolset ...
</toolset>
--- End code ---
And in a subdirectory named after the toolset (minGW) we could put XML descriptors for each tool. For the version control there are two things I thought of: Declare a base version, and add tags for the upcoming versions with nodes like <addfeature> or <removefeature>, or to create separate files for each major compiler version (gcc410.xml, gcc403.xml...)
--- Code: (xml) ---minGW/gcc.xml
<compiler>
<code>gcc</code>
<base>
<version>4.0.3</version>
<optiongroup>
<groupname>Optimization</groupname>
<option id="1">
<name>Optimize fully</name>
<value>-O3</value>
</option>
...
</optiongroup>
</base>
<versionchanges>
<versionchange id="4.1.0">
<addoption id="54">
<name>Some new feature</name>
<value>-XxX</value>
</addoption>
<removeoption>
<id>1</id>
</removeoption>
</versionchange>
...
</versionchanges>
</compiler>
--- End code ---
OR
--- Code: (xml) ---minGW/gcc410.xml
<compiler>
<code>gcc</code>
<version>4.1.0</version>
<optiongroup>
<groupname>Optimization</groupname>
<option id="1">
<name>Optimize fully</name>
<value>-O3</value>
</option>
...
</optiongroup>
...
</compiler>
--- End code ---
Is this a way to go? Please tell me, so I can think further :D
thomas:
We use something like depicted in your first code sample, except that we use named stages rather than dedicated tags for compiler and rescomp. There are separate configuration files for different versions of the same compiler.
We implement options slightly different too, insofar as we have behaviours and properties. The former are general, the latter compiler-specific.
PChris:
That's great news! :D
How exactly is the version separation solved? I'd like to know more about the upcoming solution ;)
thomas:
That's done using a challenge-response system.
Yury Benesh (aka ybx):
Clean command should also get additional temporary/itermediary files info, e.g. the OpenWatcom compiler produces *.err files if there are errors and/or warnings during the compilation.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version