[cfe-dev] Add directives-only preprocessing

Reid Kleckner via cfe-dev cfe-dev at lists.llvm.org
Wed May 17 10:17:56 PDT 2017


Clang already has -frewrite-includes for this purpose.

On Wed, May 17, 2017 at 7:30 AM, Matthew Larionov via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hello!
>
> When using clang with distributed build systems various errors may occur
> due to clang compiles
> source code differently if it was previously preprocessed(see [1] for
> example). Is it an intentional behaviour?
>
> As a solution for this kind of errors gcc provides "-fdirectives-only"
> flag([2]) to preprocess only directives, but prevent macro expansions
> outside of directives, which also speedups preprocessing
> on local machine. Are there any plans to support this kind of feature? Are
> patches welcome?
>
> 1. http://petereisentraut.blogspot.ru/2011/09/ccache-and-clang-part-2.html
> 2. https://gcc.gnu.org/ml/gcc-patches/2007-02/msg01125.html
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170517/a9121fb4/attachment.html>


More information about the cfe-dev mailing list