The only way that I know of is to use all that `-Xclang` mumbo jumbo. Luckily that script takes care of it in a fairly straightforward fashion.<div><br></div><div>There's a patch in the works that will simplify all the argument passing and plugin invocation, but I don't know if it has been accepted yet (or if it even will be accepted).</div>
<div><br></div><div>--Sean Silva<br><br><div class="gmail_quote">On Fri, Mar 16, 2012 at 5:31 PM, Philip Reames <span dir="ltr"><<a href="mailto:listmail@philipreames.com">listmail@philipreames.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you for the clarification.  I've gotten it working for now.<br>
<br>
Is there another way to load a plugin and invoke it which does not undo all the argument parsing/defaults?  I suspect that many plugins *want* all the argument parsing the frontend does.  I can see some plugins wanting to do their own argument parsing/defaults, but this doesn't seem like the most common case by far.  Thoughts?<br>

<br>
Yours,<br>
Philip Reames<div class="im"><br>
<br>
On 03/15/2012 08:48 PM, Sean Silva wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Try this example plugin:<br>
<a href="https://github.com/chisophugis/clang_plugin_example" target="_blank">https://github.com/<u></u>chisophugis/clang_plugin_<u></u>example</a><br>
<br>
The script invocation_builder.py assembles the commandline options to<br>
the normal `clang++` executable so that they get passed down to the<br>
plugin correctly and such. That way you get to benefit from the "normal"<br>
resolution of header search dirs that `clang++` before calling into `-cc1`.<br>
<br>
This is something that I grappled with for a long time, and that was my<br>
solution.<br>
<br>
On Thu, Mar 15, 2012 at 11:35 PM, Eli Friedman <<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a><br></div><div class="im">
<mailto:<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a><u></u>>> wrote:<br>
<br>
    On Thu, Mar 15, 2012 at 8:07 PM, Philip Reames<br></div><div class="im">
    <<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a> <mailto:<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.<u></u>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<br>
    paths<br>
     > from the include search list.<br>
<br>
    No, using clang -cc1 directly does that.<br>
<br>
    -Eli<br>
    ______________________________<u></u>_________________<br>
    cfe-dev mailing list<br></div>
    <a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a> <mailto:<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">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/<u></u>mailman/listinfo/cfe-dev</a><br>
<br>
<br>
</blockquote>
</blockquote></div><br></div>