Plugins are supported on platforms that support -ldl
-rdynamic. They are loaded by the compiler using
and invoked at pre-determined locations in the compilation
Plugins are loaded with
The plugin arguments are parsed by GCC and passed to respective plugins as key-value pairs. Multiple plugins can be invoked by specifying multiple -fplugin arguments.
A plugin can be simply given by its short name (no dots or slashes). When simply passing -fplugin=name, the plugin is loaded from the plugin directory, so -fplugin=name is the same as -fplugin=`gcc -print-file-name=plugin`/name.so, using backquote shell syntax to query the plugin directory.