@@ -546,25 +546,32 @@ If you encounter any difficulties, consider disabling `mold` as a
546546troubleshooting step.
547547
548548If 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
550550times. Set up with:
551551
552552On 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
555558sudo apt install ccache mold # for Debian/Ubuntu, included in most Linux distros
556559export CC=" ccache gcc" # add to your .profile
557560export CXX=" ccache g++" # add to your .profile
558561export 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+
561569On macOS:
562570
563571``` bash
564- brew install ccache mold # see https://brew.sh
572+ brew install ccache # see https://brew.sh
565573export CC=" ccache cc" # add to ~/.zshrc or other shell config file
566574export 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
570577This 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
582589configuration since the November 2020 version and allows for setting
583590breakpoints.
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
592594Stale builds can sometimes result in ` file not found ` errors while building.
0 commit comments