Try this example plugin:<div><a href="https://github.com/chisophugis/clang_plugin_example">https://github.com/chisophugis/clang_plugin_example</a> <br><br>The script invocation_builder.py assembles the commandline options to the normal `clang++` executable so that they get passed down to the plugin correctly and such. That way you get to benefit from the "normal" resolution of header search dirs that `clang++` before calling into `-cc1`.</div>
<div><br></div><div>This is something that I grappled with for a long time, and that was my solution.<br><br><div class="gmail_quote">On Thu, Mar 15, 2012 at 11:35 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thu, Mar 15, 2012 at 8:07 PM, Philip Reames<br>
<<a href="mailto:listmail@philipreames.com">listmail@philipreames.com</a>> wrote:<br>
> I'm seeing some unexpected behavior when loading a plugin for Clang.<br>
> Essentially, it appears that loading a plugin clears the default paths<br>
> from the include search list.<br>
<br>
</div>No, using clang -cc1 directly does that.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Eli<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div>