1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-11 13:06:59 +03:00

Do not mention --ld-path because -fuse-ld works both for clang and gcc

This commit is contained in:
Rui Ueyama 2022-12-30 10:53:10 +08:00
parent d5a1c7a1b3
commit 02ca6cc643

View File

@ -109,12 +109,9 @@ invoked indirectly by the compiler driver (which is usually `cc`,
If you can specify an additional command line option to your compiler
driver by modifying build system's config files, add one of the
following flags to use `mold` instead of `/usr/bin/ld`. When using
`-fuse-ld=mold`, `ld.mold` should be in your path:
following flags to use `mold` instead of `/usr/bin/ld`:
- Clang: pass `-fuse-ld=mold`
- Clang 12.0.0 or later: pass `--ld-path=path/to/mold`
- GCC 12.1.0 or later: pass `-fuse-ld=mold`
@ -128,8 +125,9 @@ following flags to use `mold` instead of `/usr/bin/ld`. When using
`ld` is actually a symlink to `mold`. So, all you need is to pass
`-B/usr/libexec/mold` (or `-B/usr/local/libexec/mold`) to GCC.
GCC does not take an absolute path as an argument for `-fuse-ld` though.
GCC also does not support `--ld-path`.
If you haven't installed `ld.mold` to any `$PATH`, you can still pass
`-fuse-ld=/absolute/path/to/mold` to clang to use mold. GCC does not
take an absolute path as an argument for `-fuse-ld` though.
</details>