Skip to content

Commit ca32563

Browse files
suofacebook-github-bot
authored andcommitted
add suggestion to use lld to CONTRIBUTING.md (#21334)
Summary: I found this significantly speeds up incremental builds. Pull Request resolved: #21334 Differential Revision: D15632994 Pulled By: suo fbshipit-source-id: bb4af90f4400bffa90d168d82ff30fece5e3835c
1 parent 4940e41 commit ca32563

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,16 @@ ccache -F 0
349349
# deploy (and add to ~/.bashrc for later)
350350
export PATH="/usr/lib/ccache:$PATH"
351351
```
352+
#### Use a faster linker
353+
If you are editing a single file and rebuilding in a tight loop, the time spent
354+
linking will dominate. The system linker available in most Linux distributions
355+
(GNU `ld`) is quite slow. Use a faster linker, like [lld](https://lld.llvm.org/).
356+
357+
The easiest way to use `lld` this is download the
358+
[latest LLVM binaries](http://releases.llvm.org/download.html#8.0.0) and run:
359+
```
360+
ln -s /path/to/downloaded/ld.lld /usr/local/bin/ld
361+
```
352362

353363
## CUDA Development tips
354364

0 commit comments

Comments
 (0)