4526: Add mold linking instructions r=heinrich5991 a=def-

Not sure it's interesting enough, but since I tried it out anyway.

Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2021-12-25 01:47:52 +00:00 committed by GitHub
commit c45b950117
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,6 +106,13 @@ You need to install `libminiupnpc-dev` on Debian, `miniupnpc` on Arch Linux.
* **-GNinja** <br>
Use the Ninja build system instead of Make. This automatically parallizes the build and is generally faster. Compile with `ninja` instead of `make`. Install Ninja with `sudo apt install ninja-build` on Debian, `sudo pacman -S --needed ninja` on Arch Linux.
* **-DCMAKE_CXX_LINK_FLAGS=[FLAGS]** <br>
Custom flags to set for compiler when linking. With clang++ as the compiler this can be [used to link](https://github.com/rui314/mold#how-to-use) with [mold](https://github.com/rui314/mold), speeds up linking by a factor of ~10:
```bash
CC=clang CXX=clang++ cmake -DCMAKE_CXX_LINK_FLAGS="--ld-path=/usr/bin/mold" .
```
Running tests (Debian/Ubuntu)
-----------------------------