"Rupert Wood" <[EMAIL PROTECTED]> wrote:
I have a problem with getting rid of -fno-unit-at-a-time. Sometimes
we compile huge Java programs; however, keeping all the method bodies
consumes vast amouts of memory.
AFAICT, MSVC solves this by generating some of the code when it reaches some
memory limit. So when GCC is under some memory pressure it could identify
functions with no/limited interdependency on other functions in the tree,
then carry out the rest of the compile passes on those functions only (i.e.
write out their code and free the IR), then pick up where it left off for
the test of the code?
I think msvc does do that, but in some circumstances, it can
be a real problem. What if there's a code generation bug that only happens
on build machines with X megabytes of memory as a result?
Or what if you care about bit-for-bit repeatable builds for some other reason?
I think some groups at Microsoft now use vmware images with
a known amount of memory to do all their builds to get around this 'feature'.
Please, if this behavior is added, let us turn it off with a flag.
BTW, I hope -fno-unit-at-a-time doesn't go away until at least gcc-4.1.1
or so... I still lean on that crutch.
- Dan