[PATCH] D34158: For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is available

Hal Finkel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 9 13:22:47 PDT 2017


hfinkel added a comment.

In https://reviews.llvm.org/D34158#837130, @joerg wrote:

> In https://reviews.llvm.org/D34158#836026, @jyknight wrote:
>
> > In https://reviews.llvm.org/D34158#827178, @joerg wrote:
> >
> > > (2) It adds magic behavior that can make debugging more difficult. Partially preprocessed sources for example could be compiled with plain -c before, now they need a different command line.
> >
> >
> > If this is a problem, making it be Linux-only does _nothing_ to solve it. But I don't actually see how this is a substantively new problem? Compiling with plain -c before
> >  would get #defines for those predefined macros that the compiler sets, even though you may not have wanted those. Is this fundamentally different?
>
>
> It makes it a linux-only problem. As such, it is something *I* only care about secondary. A typical use case I care about a lot is pulling the crash report sources from my (NetBSD) build machine,
>  extracting the original command line to rerun the normal compilation with -save-temps. I don't necessarily have the (same) system headers on the machine I use for debugging and that's exactly
>  the kind of use case this change breaks. All other predefined macros are driven by the target triple and remain stable.


Don't you use preprocessed source files from a crash?


https://reviews.llvm.org/D34158





More information about the cfe-commits mailing list