[cfe-dev] How to determine clang's system include dirs, to set in ASTVisitor?

Jordan Rose jordan_rose at apple.com
Wed Dec 19 18:06:40 PST 2012


On Dec 19, 2012, at 18:04 , Dmitri Gribenko <gribozavr at gmail.com> wrote:

> On Thursday, December 20, 2012, Sean Silva wrote:
> Yes, having to hardcode this this is a pain in the ***. Unfortunately,
> it is a pretty nasty problem to solve. Probably the most palatable
> option currently is to embed the headers inside the clang libraries
> (in the binaries) and have it fall back on those if the current
> "hardcoded" lookup fails. But that requires messing around with the
> build system; nobody has stepped up to do that.
> 
> And there's also a concern that if someone gets an error message referencing stddef.h, they might want to actually open and read it.  But that's impossible if the header is embedded in the executable.

Well, we do already have that problem for predefines, but at least people don't expect those to be files. Still, at least there'd be a workaround: "echo '#include <stddef.h>' | clang -E"

Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121219/8c9cfc0f/attachment.html>


More information about the cfe-dev mailing list