[cfe-dev] Multiple plug-ins in one shared lib?

Nico Weber thakis at chromium.org
Sun Dec 25 07:42:23 PST 2011


-add-plugin supports multiple plugins, so you could pass the first
plugin through -plugin and the rest through to -add-plugin. (Or use
-add-plugin for all of them if you don't mind codegen running as
well.)

Nico

On Sun, Dec 25, 2011 at 1:39 AM, Jordy Rose <jediknil at belkadan.com> wrote:
> Hi, Erik. AFAIK it's not yet possible to run multiple plugin actions from a single invocation of clang. This has nothing to do with where the actions come from; it's just how -plugin is handled.
>
> Please file a bug at http://llvm.org/bugs with your expected behavior: do you want the plugins to be run serially on the original AST, or should they be able to return a new AST so they can act as filters of some kind, or...
>
> (my guess is you just want the first one, but I thought I'd bring it up)
>
> Jordy
>
>
> On Dec 12, 2011, at 20:41, Erik Verbruggen wrote:
>
>> Hello,
>>
>> I could not find it back in the mailinglist archives, so: can I put
>> multiple clang plug-ins into a single shared library? I tried to do
>> that, but when I run it with:
>>   clang -cc1 -load libA.dylib -plugin B -plugin C test.cpp
>>
>> .. then only the C plug-in (the last -plugin) is run. If this is not
>> possible (yet?), is there another way to register multiple
>> ASTConsumer/RecursiveASTVisitor classes from a PluginASTAction?
>>
>> -- Erik.
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list