[cfe-dev] Is loading a plugin expected to change include search directories?

Sean Silva silvas at purdue.edu
Thu Mar 15 20:48:11 PDT 2012


Try this example plugin:
https://github.com/chisophugis/clang_plugin_example

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`.

This is something that I grappled with for a long time, and that was my
solution.

On Thu, Mar 15, 2012 at 11:35 PM, Eli Friedman <eli.friedman at gmail.com>wrote:

> On Thu, Mar 15, 2012 at 8:07 PM, Philip Reames
> <listmail at philipreames.com> wrote:
> > I'm seeing some unexpected behavior when loading a plugin for Clang.
> > Essentially, it appears that loading a plugin clears the default paths
> > from the include search list.
>
> No, using clang -cc1 directly does that.
>
> -Eli
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120315/0fc776f5/attachment.html>


More information about the cfe-dev mailing list