This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [plugins] binary-level or source-level?
- From: Diego Novillo <dnovillo at google dot com>
- To: Pjotr Kourzanov <peter dot kourzanov at xs4all dot nl>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 11 Feb 2009 18:14:02 -0500
- Subject: Re: [plugins] binary-level or source-level?
- References: <1234370806.9145.48.camel@localhost>
On Wed, Feb 11, 2009 at 11:46, Pjotr Kourzanov
<peter.kourzanov@xs4all.nl> wrote:
> Should we not have a way to specify a plugin in the source itself?
> This could be achieved by tagging a function with a __plugin__
> attribute (or a #pragma), exporting the PluginAPI as a bunch of
> built-in functions and having the compiler itself (1) ensure that such
> functions only call portable built-ins, and (2) compiling/executing or
> interpreting them as compilation passes. Then, the code can just
> #include a source-level plugin to have it available just for that
> translation unit.
But then, what would be the difference between this and just adding
your pass to the compiler? I'm not sure I understand what this would
buy you in terms of simplicity. Perhaps I'm missing something.
Diego.