aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-02-13 19:39:21 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-02-14 08:51:41 +0530
commit03bfc47ebf8a6d434b48b2fc556f0a2aa96b5b9a (patch)
tree1cd134caa94e6389cd0072117d3529e272736482 /docs
parent47759550e5f6a5e617ff686f2b5f275ade97c4b2 (diff)
downloadmeson-03bfc47ebf8a6d434b48b2fc556f0a2aa96b5b9a.zip
meson-03bfc47ebf8a6d434b48b2fc556f0a2aa96b5b9a.tar.gz
meson-03bfc47ebf8a6d434b48b2fc556f0a2aa96b5b9a.tar.bz2
docs: Update documentation about linker selection
We missed this in https://github.com/mesonbuild/meson/pull/6457
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Release-notes-for-0.53.0.md24
-rw-r--r--docs/markdown/howtox.md4
2 files changed, 23 insertions, 5 deletions
diff --git a/docs/markdown/Release-notes-for-0.53.0.md b/docs/markdown/Release-notes-for-0.53.0.md
index 22db714..b29759f 100644
--- a/docs/markdown/Release-notes-for-0.53.0.md
+++ b/docs/markdown/Release-notes-for-0.53.0.md
@@ -74,15 +74,33 @@ flags passed via language flags and hoped things worked out. In meson 0.52.0
meson started detecting the linker and making intelligent decisions about
using it. Unfortunately this broke choosing a non-default linker.
-Now there is a generic mechanism for doing this, you may use the LD
-environment variable (with normal meson environment variable rules), or add
-the following to a cross or native file:
+Now there is a generic mechanism for doing this. In 0.53.0, you can use the `LD`
+environment variable. **In 0.53.1** this was changed to `<compiler_variable>_LD`,
+such as `CC_LD`, `CXX_LD`, `D_LD`, etc due to regressions. The usual meson
+[environment variable rules](https://mesonbuild.com/Running-Meson.html#environment-variables)
+apply. Alternatively, you can add the following to a cross or native file:
+
+In 0.53.0:
```ini
[binaries]
ld = 'gold'
```
+**In 0.53.1 or newer**:
+
+```ini
+[binaries]
+c = 'gcc'
+c_ld = 'gold'
+```
+
+```ini
+[binaries]
+c = 'clang'
+c_ld = 'lld'
+```
+
And meson will select the linker if possible.
## `fortran_std` option
diff --git a/docs/markdown/howtox.md b/docs/markdown/howtox.md
index 452da2c..f70ff47 100644
--- a/docs/markdown/howtox.md
+++ b/docs/markdown/howtox.md
@@ -31,11 +31,11 @@ native-files and the latter via the cross file only.
*New in 0.53.0*
Like the compiler, the linker is selected via the `<compiler variable>_LD`
-environment variable, or through the `<compiler entry>ld` entry in a native
+environment variable, or through the `<compiler entry>_ld` entry in a native
or cross file. You must be aware of whether you're using a compiler that
invokes the linker itself (most compilers including GCC and Clang) or a
linker that is invoked directly (when using MSVC or compilers that act like
-it, including Clang-Cl). With the former `cld` or `CC_LD` should be the value
+it, including Clang-Cl). With the former `c_ld` or `CC_LD` should be the value
to pass to the compiler's special argument (such as `-fuse-ld` with clang and
gcc), with the latter it should be an executable, such as `lld-link.exe`.