aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-manual.md
diff options
context:
space:
mode:
authorEvgenii Shatokhin <eugene.shatokhin@rosalab.ru>2018-02-25 16:02:10 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2018-03-06 21:07:16 +0200
commit19718a8d9c5cb6d9ac2c2cbb5459178906a3a007 (patch)
tree60ae3fa4084c7ffe0f1b8c97d5ab58b80c2cf509 /docs/markdown/Reference-manual.md
parent048508c989081f8bcf54d76f5b13138cc3f47738 (diff)
downloadmeson-19718a8d9c5cb6d9ac2c2cbb5459178906a3a007.zip
meson-19718a8d9c5cb6d9ac2c2cbb5459178906a3a007.tar.gz
meson-19718a8d9c5cb6d9ac2c2cbb5459178906a3a007.tar.bz2
Allow passing a compiler object to run_command()
Sometimes it is needed to run the current compiler with specific options not to compile a file but rather to obtain additional info. For example, GCC has several -print-* options to query it about the paths to different libraries and development files. One use case is to get the location of development files for GCC plugins, which is not easily obtainable by other means: gcc -print-file-name=plugin For this purpose, it would be convenient if the compiler object returned by meson.get_compiler(lang) could be used in run_command() directly. This commit implements it. Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r--docs/markdown/Reference-manual.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index e816795..b05c555 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -980,9 +980,13 @@ Project supports the following keyword arguments.
runresult run_command(command, list_of_args)
```
-Runs the command specified in positional arguments. Returns [an opaque
-object](#run-result-object) containing the result of the
-invocation. The script is run from an *unspecified* directory, and
+Runs the command specified in positional arguments.
+`command` can be a string, or the output of [`find_program()`](#find_program),
+[`files()`](#files) or [`configure_file()`](#configure_file), or
+[a compiler object](#compiler-object).
+
+Returns [an opaque object](#run-result-object) containing the result of the
+invocation. The command is run from an *unspecified* directory, and
Meson will set three environment variables `MESON_SOURCE_ROOT`,
`MESON_BUILD_ROOT` and `MESON_SUBDIR` that specify the source
directory, build directory and subdirectory the target was defined in,