Skip to content

Commit d20515a

Browse files
congzhangzhMoLow
authored andcommitted
doc: remove mold use on mac for speeding up build
Co-authored-by: Vinicius Lourenço <12551007+H4ad@users.noreply.github.com> PR-URL: nodejs#52252 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent 6aa9047 commit d20515a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

BUILDING.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -546,25 +546,32 @@ If you encounter any difficulties, consider disabling `mold` as a
546546
troubleshooting step.
547547

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

552552
On GNU/Linux:
553553

554+
Tips: `mold` can speed up the link process, which can't be cached, you may
555+
need to install the latest version but not the apt version.
556+
554557
```bash
555558
sudo apt install ccache mold # for Debian/Ubuntu, included in most Linux distros
556559
export CC="ccache gcc" # add to your .profile
557560
export CXX="ccache g++" # add to your .profile
558561
export LDFLAGS="-fuse-ld=mold" # add to your .profile
559562
```
560563

564+
Refs:
565+
566+
1. <https://ccache.dev/performance.html>
567+
2. <https://github.com/rui314/mold>
568+
561569
On macOS:
562570

563571
```bash
564-
brew install ccache mold # see https://brew.sh
572+
brew install ccache # see https://brew.sh
565573
export CC="ccache cc" # add to ~/.zshrc or other shell config file
566574
export CXX="ccache c++" # add to ~/.zshrc or other shell config file
567-
export LDFLAGS="-fuse-ld=mold" # add to ~/.zshrc or other shell config file
568575
```
569576

570577
This will allow for near-instantaneous rebuilds when switching branches back
@@ -582,11 +589,6 @@ the specified directory. The JS debugger of Visual Studio Code supports this
582589
configuration since the November 2020 version and allows for setting
583590
breakpoints.
584591

585-
Refs:
586-
587-
1. <https://ccache.dev/performance.html>
588-
2. <https://github.com/rui314/mold>
589-
590592
#### Troubleshooting Unix and macOS builds
591593

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

0 commit comments

Comments
 (0)