summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Builtin-options.md3
-rw-r--r--docs/markdown/snippets/default_both_libraries.md7
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md
index 178f793e4..2018b9575 100644
--- a/docs/markdown/Builtin-options.md
+++ b/docs/markdown/Builtin-options.md
@@ -187,6 +187,9 @@ with previous meson versions), 'static', or 'auto'. With auto, the value from
`default_library` option is used, unless it is 'both', in which case 'shared'
is used instead.
+When `default_both_libraries` is 'auto', passing a [[@both_libs]] dependecy
+in [[both_libraries]] will link the static dependency with the static lib,
+and the shared dependency with the shared lib.
## Base options
diff --git a/docs/markdown/snippets/default_both_libraries.md b/docs/markdown/snippets/default_both_libraries.md
index 279c43d22..dc9cb6bca 100644
--- a/docs/markdown/snippets/default_both_libraries.md
+++ b/docs/markdown/snippets/default_both_libraries.md
@@ -2,3 +2,10 @@
`both_libraries` targets used to be considered as a shared library by default.
There is now the `default_both_libraries` option to change this default.
+
+When `default_both_libraries` is 'auto', [[both_libraries]] with dependencies
+that are [[@both_libs]] themselves will link with the same kind of library.
+For example, if `libA` is a [[@both_libs]] and `libB` is a [[@both_libs]]
+linked with `libA` (or with an internal dependency on `libA`),
+the static lib of `libB` will link with the static lib of `libA`, and the
+shared lib of `libA` will link with the shared lib of `libB`.