[cfe-dev] Loading plugins (dynamic libraries) before forwarding argument to LLVM

Amaury Pouly amaury.pouly at gmail.com
Wed Aug 4 03:39:51 PDT 2010


Hello,
I'm new to clang so perhaps there already is a way to describe what I want
to do.
I would like to be able to load a plugin before the driver forwards the
argument given by -mllvm to LLVM. In my case this is useful to experiment
with a backend scheduler: I first need to load the plugin which provides it
and then select it via a LLVM option.
The problems is that, as far as I understand the code in
tools/driver/cc1_main.cpp, impossible because the driver first forward
arguments to LLVM and then load plugins.
Is there a good reason to have this order or is just arbitrary ?

As an experiment, I reordered the two things and manage to make it work the
way I expected but I understand that -mllvm is not an option supposed to be
used by every user :) Is there a chance that such scenario be handle by
clang in the future ?

Regards

Amaury Pouly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100804/4a369c3f/attachment.html>


More information about the cfe-dev mailing list