This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [plugins] [patch] Initial implementation of GCC plugin support
Le-Chun Wu wrote:
On Tue, Feb 24, 2009 at 2:03 PM, Basile STARYNKEVITCH
<basile@starynkevitch.net> wrote:
Just make sure that the plugins are really initialized, and perhaps even get
some initial event, when gcc is invoked without any source file.
As you also found out, running gcc or g++ without input source files
will not invoke cc1 or cc1plus, which means where we call
initialize_plugins() in cc1/cc1plus doesn't really matter in this
case. In order to support your usage (or '--version' and '--help'
options) with plugins (without input source files), we will need to
modify gcc/g++ drivers. I have noted this issue in the TODO.
I do believe that modifying the gcc driver to still run cc1 without any
sources is useful, precisely for the cases I explained (i.e. gcc
-fplugin=compilation-server.so for instance to run a compilation server
plugin without arguments). Hence I am suggesting a
-frun-cc1-without-input option which, when passed to gcc, check that
indeed no input file is given (and warn otherwise), and forces cc1 to be
run (without input files) and is passed to cc1.
Or perhaps we need the gcc driver itself to also accept plugins?
A question to those having worked on a gcc compilation server in a
branch: do they imagine their work been ported to the plugin infrastructure?
A big thanks to Le-Chun and others.
Regards.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***