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

Blower, Melanie via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 07:26:14 PDT 2017


 
fedor.sergeev added a comment.

In https://reviews.llvm.org/D34158#834298, @mibintc wrote:

> In fact I did have trouble writing the new test case to pass with the gnu/Linux toolchain. In the file lib/Driver/ToolChains/Linux.cpp function AddGnuIncludeArgs checks if GCCInstallation.isValid().


You should not be doing stdc-predef.h under GCCInstallation.isValid().
You are handling interaction with libc, so it has nothing to do with the presence or absence of gcc toolchain.

>> Thanks, Fedor.  I'm uploading another patch which pulls out the "isValid" check. Also I'm putting back the dummy sysroot tree which contains stdc-predef.h and adding a new test run to confirm that the new option fsystem-include-if-exists is actually working. 
https://reviews.llvm.org/D34158





More information about the cfe-commits mailing list