aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-05-02 01:57:09 +0300
committerGitHub <noreply@github.com>2020-05-02 01:57:09 +0300
commitf8a04f0f76a09e875a2a2235facf9f58bb5031b5 (patch)
treec64779d76cba72fde7848616fd816a9998b90e31 /docs
parent30c4a7744f00c0393e4f261a6337d65b4c4d469d (diff)
parent1bfeaadd6d1dc87532a1c0ad4be615eb34044495 (diff)
downloadmeson-f8a04f0f76a09e875a2a2235facf9f58bb5031b5.zip
meson-f8a04f0f76a09e875a2a2235facf9f58bb5031b5.tar.gz
meson-f8a04f0f76a09e875a2a2235facf9f58bb5031b5.tar.bz2
Merge pull request #6838 from dcbaker/link-language-in-libraries
Link language in libraries
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Reference-manual.md8
-rw-r--r--docs/markdown/snippets/link_language_all_targets.md8
2 files changed, 14 insertions, 2 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 963af9d..5c5f56a 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -600,8 +600,12 @@ be passed to [shared and static libraries](#library).
depends on such as a symbol visibility map. The purpose is to
automatically trigger a re-link (but not a re-compile) of the target
when this file changes.
-- `link_language` since 0.51.0 makes the linker for this target
- be for the specified language. This is helpful for multi-language targets.
+- `link_language` since 0.51.0 (broken until 0.55.0) makes the linker for this
+ target be for the specified language. It is generally unnecessary to set
+ this, as meson will detect the right linker to use in most cases. There are
+ only two cases where this is needed. One, your main function in an
+ executable is not in the language meson picked, or second you want to force
+ a library to use only one ABI.
- `link_whole` links all contents of the given static libraries
whether they are used by not, equivalent to the
`-Wl,--whole-archive` argument flag of GCC, available since 0.40.0.
diff --git a/docs/markdown/snippets/link_language_all_targets.md b/docs/markdown/snippets/link_language_all_targets.md
new file mode 100644
index 0000000..9019d50
--- /dev/null
+++ b/docs/markdown/snippets/link_language_all_targets.md
@@ -0,0 +1,8 @@
+## link_language argument added to all targets
+
+Previously the `link_language` argument was only supposed to be allowed in
+executables, because the linker used needs to be the linker for the language
+that implements the main function. Unfortunately it didn't work in that case,
+and, even worse, if it had been implemented properly it would have worked for
+*all* targets. In 0.55.0 this restriction has been removed, and the bug fixed.
+It now is valid for `executable` and all derivative of `library`.