This is the mail archive of the gcc-patches@gcc.gnu.org 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: PATCH PING: distcc and ccache speedup: adds directives-only preprocessing


Thanks for championing this, Ian. It'll be good to finally get it in.

On 7/25/07, Mark Mitchell <mark@codesourcery.com> wrote:
This patch is OK, with one caveat: I think the documentation could be
better.

Agreed. The documentation below is (hopefully) more readable. Take a look, and if everyone approves, I'll go ahead and submit the modified patch.

Ollie


@item -fdirectives-only @opindex fdirectives-only This option provides a simplified preprocessor that improves the performance of applications such as ccache and distcc. In both these cases, usage is straightforward:

@smallexample
distcc /usr/bin/gcc -fdirectives-only [COMPILER OPTIONS]
@end smallexample

The option's behavior depends on the @option{-E} and @option{-fpreprocessed}
options.

With @option{-E}, preprocessing is limited to the handling of directives
such as @code{#define}, @code{#ifdef}, and @code{#error}.  Other
preprocessor operations, such as macro expansion and trigraph
conversion are not performed.  In addition, the @option{-dD} option is
implicitly enabled.

With @option{-fpreprocessed}, predefinition of command line and most
builtin macros is disabled.  Macros such as @code{__LINE__}, which are
contextually dependent, are handled normally.  This enables compilation of
files previously preprocessed with @code{-E -fdirectives-only}.

With both @option{-E} and @option{-fpreprocessed}, the rules for
@option{-fpreprocessed} take precedence.  This enables full preprocessing of
files previously preprocessed with @code{-E -fdirectives-only}.


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