This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH PING: distcc and ccache speedup: adds directives-only preprocessing
- From: "Ollie Wild" <aaw at google dot com>
- To: "Mark Mitchell" <mark at codesourcery dot com>
- Cc: "Ian Lance Taylor" <iant at google dot com>, gnu at the-meissners dot org, wilson at specifixinc dot com, tromey at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 26 Jul 2007 14:33:38 -0700
- Subject: Re: PATCH PING: distcc and ccache speedup: adds directives-only preprocessing
- References: <m3myxkfp6x.fsf@localhost.localdomain> <46A80DEE.9060908@codesourcery.com>
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}.