[cfe-dev] Add directives-only preprocessing

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Wed May 17 10:37:40 PDT 2017


If it actually does the same thing as GCC's -fdirectives-only, I'd be happy
to review a patch to provide that as an alias.

On Wed, May 17, 2017 at 10:18 AM Reid Kleckner via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> 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
>>
>>
> _______________________________________________
> 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/e3f562c3/attachment.html>


More information about the cfe-dev mailing list