<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 11, 2016 at 3:08 PM, Douglas Katzman <span dir="ltr"><<a href="mailto:dougk@google.com" target="_blank">dougk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Remove '-nobuiltininc' and substitute '-nostdinc'.  That's in addition to '-nostdinc++'</div></blockquote><div><br></div><div>Great answer Duglas, thank you very much, it has done perfectly for my proposes... On my free time I'm working on a tool based on libclang to provide an a generic API as facilitator to: parse, query and navigate through a large database of C plus plus code project, and I'm putting all my efforts specially on caching external headers parse, to optimize on re-parse time of huge inline third party libraries that are shared between translation units (obviously considering the preprocessor issues).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-h5">On Fri, Nov 11, 2016 at 11:00 AM, Emilio Pombo via cfe-users <span dir="ltr"><<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><div dir="ltr">Hi,<div><br></div><div>I want to make clang parser to avoid all default and builtin include path in my system (Ubuntu 14.04.5 LTS) for lib C and C++ stl (GNU, LLVM or whatever). I'm using the two most canonical options for doing that (I think): -<b>nobuiltininc</b> and -<b>nostdinc++</b>, also tried to change some roots or prefixes with -isysroot , -iwithprefix or --gcc-toolchai<wbr>n, but still with no luck.</div><div><br></div><div>A simple example of my clang unwanted behavior could be:</div><div><br></div><div><font face="monospace, monospace"><b>$</b> echo '#include <aio.h>' > aio.cc<br></font></div><div><div><font face="monospace, monospace"><b>$</b> clang++ -nobuiltininc -nostdinc++ -v aio.cc</font></div><div><font face="monospace, monospace">clang version 3.9.1-svn281634-1~exp1 (branches/release_39)</font></div></div><div><font face="monospace, monospace">...</font></div><div><div><font face="monospace, monospace">ignoring nonexistent directory "/include"</font></div><div><font face="monospace, monospace">#include "..." search starts here:</font></div><div><font face="monospace, monospace">#include <...> search starts here:</font></div><div><font face="monospace, monospace"> <b>/usr/local/include</b></font></div><div><font face="monospace, monospace"><b> /usr/include/x86_64-linux-gnu</b></font></div><div><font face="monospace, monospace"><b> /usr/include</b></font></div><div><font face="monospace, monospace">End of search list.</font></div></div><div><font face="monospace, monospace">...</font></div><div><br></div><div>So in this execution clang ends up finding the header aio.h (in /usr/include/), while this is just the behavior I'm looking forward to modify. Any ideas to change it?</div><div><br></div><div>With the clang verbose option, you can see that those paths are included before the parser starts, using flags like: -<b>internal</b>-isystem and -<b>internal</b>-externc-isystem, there is a way to change or turn-off those internal settings?</div><div><br></div><div>Thanks in advance!</div><span class="gmail-m_-2506059899503708114HOEnZb"><font color="#888888"><div><br></div><div>Emilio.</div></font></span></div>
<br></div></div>______________________________<wbr>_________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div>