On Saturday, 15 December 2012 at 18:44:35 UTC, H. S. Teoh wrote:
On Sat, Dec 15, 2012 at 07:30:52PM +0100, RenatoUtsch wrote:
On Saturday, 15 December 2012 at 18:00:58 UTC, H. S. Teoh wrote:
[...]
>So perhaps one possible middle ground would be to link >packages >separately, but compile all the sources within a single >package at >once. Presumably, if the project is properly organized, >recompiling >a single package won't take too long, and has the perk of >optimizing
>for size within packages. This will probably also map to SCons
>easily, since SCons builds per-directory.
[...]
Well, the idea is good. Small projects usually don't have much
packages, so there will be just a few compiler calls. And compiling files concurrently will only have a meaningful efect if the project
is large, and a large project will have a lot of packages.

Yes, that's the idea behind it.


Maybe adding an option to choose between compiling all sources at once, per package, or per source. For example, in development and debug builds the compilation is per file or package, but in release builds all sources are compiled at once, or various packages at once.

This way release builds will take advantage of this behavior that the frontend has, but developers won't have productivity issues. And, of couse, the behaviour will not be fixed, the devs that are
using the build system will choose that.

I forgot to mention also, that passing too many source files to the compiler may sometimes cause memory consumption issues, as the compiler has to hold everything in memory. This may not be practical for very
large project, where you can't fit everything into RAM.


T

Well, so compiling by packages seem to be the best approach. When I return home I will do some tests to see what I can do.

-- Renato

Reply via email to