Skip to content

Commit bfca75a

Browse files
Merge pull request #26 from QuarticCat/mold
Suggest MOLD_JOBS=1 env var in ch08
2 parents 194a592 + 1daa33e commit bfca75a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

engineering-book/src/ch08-compile-time-and-developer-tools.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,18 @@ sudo apt install mold # Ubuntu 22.04+
5555
# The macOS linker (ld64) is already quite fast; if you need faster:
5656
# brew install sold # sold = mold for Mach-O (experimental, less mature)
5757
# In practice, macOS link times are rarely a bottleneck.
58+
```
5859

60+
```toml
5961
# Use mold for linking
6062
# .cargo/config.toml
6163
[target.x86_64-unknown-linux-gnu]
6264
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
65+
```
66+
67+
```bash
68+
# See https://github.com/rui314/mold/blob/main/docs/mold.md#environment-variables
69+
export MOLD_JOBS=1
6370

6471
# Verify mold is being used
6572
cargo build -v 2>&1 | grep mold

0 commit comments

Comments
 (0)