2009/2/1 Sean Callanan <spy...@cs.sunysb.edu>: > > (3) The -fplugin-arg argument is one way to do arguments. We do it as > > -ftree-plugin=/path/to/plugin.so:arg=value:arg=value:... >
In the previous discussions we had on this whole thing (http://gcc.gnu.org/ml/gcc/2008-09/msg00292.html), we were aiming towards arguments like: (Style 1) -fplugin=<name> -f<name>-<arg>[=<value>] so this might look like: gcc -fplugin=edoc -fedoc-file=blah.edc -fedoc-embed The idea was that GCC would then search for the plugin on some defined search path (that will be specific for the build tuple and GCC version) OR a user could specify the plugin including path on the command line directly. So the above COULD look something like: gcc -fplugin=/usr/local/lib/gcc-4.0.4/i386-unknown-netbsdelf3.0/edoc.so.1.0.0 -fedoc-file=blah.edc -fedoc-embed gcc -fplugin=/usr/local/lib/gcc-4.0.4/i386-unknown-netbsdelf3.0/edoc.so.1.0.0 -fedoc-file=blah.edc -fedoc-embed I understand that currently we are looking at a new format like: (Style 2) -fplugin=<plugin-file>;<arg>[=<value>];<arg>[=<value>]... example: gcc -fplugin=/usr/local/lib/gcc-4.0.4/i386-unknown-netbsdelf3.0/edoc.so.1.0.0;file=blah.edc;embed I personally prefer Style 1 for the plugin framework. My reasons include: * It looks more like existing options and has a level of familiarity. * Using ';' to separate args can be confusing to new people especially if they forget to quote them properly (I can see many questions on gcc-help arising from this). Also is ';' safe to use on all systems or can some filesystems include the ';' character in a file/path name? * I like to have the option for the plugin to be searched for by GCC on a pre-defined search path. For those that want to specify their plugins explicitly, they can still do so. * I know that "automatic loading" of plugins is not going to be in the plugin framework, but if in the future we DID decide to add it (for some unknown reason), then the plugin arguments would not need to be changed. I.e. With the above example if the plugin: edoc was to be automatically loaded, its arguments could be provided like: gcc -fedoc-file=blah.edc -fedoc-embed which is just the same as it was before, but the -fplugin=edoc was omitted. Brendon.