Skip to content

Commit d4881c0

Browse files
committed
doc: remove mold use on mac for speeding up build
Co-authored-by: Vinicius Lourenço <[email protected]>
1 parent 756acd0 commit d4881c0

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

BUILDING.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -536,25 +536,32 @@ If you encounter any difficulties, consider disabling `mold` as a
536536
troubleshooting step.
537537

538538
If you plan to frequently rebuild Node.js, especially if using several
539-
branches, installing `ccache` and `mold` can help to greatly reduce build
539+
branches, installing `ccache` can help to greatly reduce build
540540
times. Set up with:
541541

542542
On GNU/Linux:
543543

544+
Tips: `mold` can speed up the link process, which can't be cached, you may
545+
need to install the latest version but not the apt version.
546+
544547
```bash
545548
sudo apt install ccache mold # for Debian/Ubuntu, included in most Linux distros
546549
export CC="ccache gcc" # add to your .profile
547550
export CXX="ccache g++" # add to your .profile
548551
export LDFLAGS="-fuse-ld=mold" # add to your .profile
549552
```
550553

554+
Refs:
555+
556+
1. <https://ccache.dev/performance.html>
557+
2. <https://github.com/rui314/mold>
558+
551559
On macOS:
552560

553561
```bash
554-
brew install ccache mold # see https://brew.sh
562+
brew install ccache # see https://brew.sh
555563
export CC="ccache cc" # add to ~/.zshrc or other shell config file
556564
export CXX="ccache c++" # add to ~/.zshrc or other shell config file
557-
export LDFLAGS="-fuse-ld=mold" # add to ~/.zshrc or other shell config file
558565
```
559566

560567
This will allow for near-instantaneous rebuilds when switching branches back
@@ -572,11 +579,6 @@ the specified directory. The JS debugger of Visual Studio Code supports this
572579
configuration since the November 2020 version and allows for setting
573580
breakpoints.
574581

575-
Refs:
576-
577-
1. <https://ccache.dev/performance.html>
578-
2. <https://github.com/rui314/mold>
579-
580582
#### Troubleshooting Unix and macOS builds
581583

582584
Stale builds can sometimes result in `file not found` errors while building.

0 commit comments

Comments
 (0)