For MSVC it is about 100 MB. For some projects it requires passing a special option for encreasing memory limit.
But still, 300 MB should not be an issue. We have like gigabytes of memory available, even more with 64-bit. Is this a memory limit problem or some else compiler issue?
Yes, I can post them if you like.
Still, is there anything wrong with the old ones? (apart from their age) The MSVC libraries pack contains binaries both for 32-bit and 64-bit.
oO
Is there any particular reason why you want to have a 64-bit build of VCMI?
I once succeeded in builting 64-bit VCMI with Visual but it didn’t seem to work any faster. It just introduces more issues (incompatible with H3 video player DLLs, not portable on 32-bit systems, and so on).
Basically the whole point of PCH is gathering stable includes — that is things that rarely change, like STL, Boost or other libraries. Trying to strip PCH from rarely used stable headers is against its purpose.
As for the build times there are basically 3 constituents:
- processing includes (ton of text that gets after preprocessing the file)
- processing the actual file contents
- handling templates
Precompiled headers successfully solve issue #1. I can have tons of Boost and Qt headers included and still be able to compile file very fast — provided that source code is really small. However, as the file grows, factors #2 and #3 become more significant.
The #3 is probably worst. Every compile unit instantiates all used templates, so we end up compiling definitions of containers, smart pointers, etc dozens and dozens of times in every compilation unit.
I am very curious if that could be worked around by blocking template instantiations globally (extern template) and instantiating them explicitly in a single compilation unit.
Obviously, to have any sense and being scalable, such instantiations would have to be automatically generated. *
Btw, are there any particular reasons why CMake doesn’t use PCH?
There is one thing that puzzles me.
You say that you have precompiled headers turned off. This means that effectively you are compiling the contents of PCH for every compilation unit. [This is a burden, the question is how significant it is when compared to other building time factors.] Still, you manage to compile the whole project without problems in 2:30.
How is that you can compile a file that has PCH (by incldues) + file contents without issue but MinGW has trouble with the PCH itself?
Is this the MinGW-specific issue or sth related to the build system?*