summaryrefslogtreecommitdiff
path: root/gcc/doc/plugins.texi
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/doc/plugins.texi')
-rw-r--r--gcc/doc/plugins.texi8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/doc/plugins.texi b/gcc/doc/plugins.texi
index a938e02bb61..77000fee646 100644
--- a/gcc/doc/plugins.texi
+++ b/gcc/doc/plugins.texi
@@ -22,6 +22,11 @@ The plugin arguments are parsed by GCC and passed to respective
plugins as key-value pairs. Multiple plugins can be invoked by
specifying multiple @option{-fplugin} arguments.
+A plugin can be simply given by its short name (no dots or
+slashes). When simply passing @option{-fplugin=NAME}, the plugin is
+loaded from the @file{plugin} directory, so @option{-fplugin=NAME} is
+the same as @option{-fplugin=`gcc -print-file-name=plugin`/NAME.so},
+using backquote shell syntax to query the @file{plugin} directory.
@section Plugin API
@@ -407,6 +412,9 @@ On most systems, you can query this @code{plugin} directory by
invoking @command{gcc -print-file-name=plugin} (replace if needed
@command{gcc} with the appropriate program path).
+Inside plugins, this @code{plugin} directory name can be queried by
+calling @code{default_plugin_dir_name ()}.
+
The following GNU Makefile excerpt shows how to build a simple plugin:
@smallexample