This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Don't require -DIN_GCC while compiling plugins


> I find both approaches equally good. ÂEither make gcc-plugin.h include
> config.h and system.h or document that config.h and system.h should
> always be included first.

What I would like is for the definitions in gcc-plugin.h to be just
plain C so that it doesn't need to include gcc headers. The idea
behind this is that if a developer prototypes a pass as a plugin,
removing gcc-plugin.h and the functions that use definition in it
should be all that is necessary to port to gcc proper. Currently that
is not true because pass arguments would have to be converted into gcc
arguments.

There is also the fact that it is nice to have a plugin interface that
is simpler. For example, the gold plugin interface does not depend on
any internal structure used by gold. This is not as important to gcc
for now, since it is very unlikely that a software other then gcc wold
like to use gcc plugins.

> It could be argued that by creating a single include file, regular
> passes could migrate to do what plugins do. ÂBut I see the value of
> not having huge all-encompassing header files.
>
> Whether we should move to a single header file model is another shed
> that we can paint at the summit in a few days, I guess.

If we do created a header file with all the  API it should probably be
optional. The easy way to do it is to make sure it contains nothing
other than includes of other gcc headers.

>
> Diego.
>


Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]