This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with PFE approach [Was: Faster compilation speed]

On Friday, August 16, 2002, at 02:31 PM, Timothy J. Wood wrote:

On Friday, August 16, 2002, at 01:43  PM, Devang Patel wrote:

In both cases work around is same. A file needs to undef, as I explained in previous email.
I didn't see that on the PB list before I posted to the gcc list :)

At any rate, this seems like a horrific and non-obvious workaround. This is a support burden waiting to happen. (Of course, this header usage is silly, so I'm reaping the foul returns of the Win32 header design :)

Actually, it doesn't seem to work for me either... I'll take this up on the PB list, though...

It is a different model. All models which follows prefix header mechanism, will behave same as PFE.

I'm not a fan of prefix headers in general, certainly not for huge globs of crud like a PFE. As a stylistic issue, I really only like prefix headers for replacing simple -D flags on the command line and such.
In this case you do not like prefix header mechanism, so no doubt PFE looks like crud.

I still maintain that the developer should not have to build and maintain a massive header for their project -- the IDE/compiler should deal with it transparently.
IDE can handle this transparently. But you do not need to have one massive header for all.
You can have multiple prefix file for different modules/sub projects.

This falls into the Achilles Heel area of free software -- moderately experienced developers can figure this stuff out, but Joe Bob is going to sit down with gcc and see that his project builds slowly and switch back to his proprietary compiler. Ease of use is important.
If a project becomes large enough to notice slow down and Joe is not using an IDE than
I can assume, Joe can figure out how to setup makefiles to use prefix headers.

The fact that you have to build this massive single header that acts as a prefix header is the broken part -- implementation details like this should not be exposed to the user.
It's prefix header! Usually large projects have one set of headers (or one single header)
which is included in every source file. And that is prefix header. No need to make new one.

If that is not the case then, in PFE, you can use --dbgpfe=h command line option.
It will tell you which header is part of precompiled header and which one is not.
Initially you can use such lists from all compilation, to find out common set of headers.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]