@@ -536,25 +536,32 @@ If you encounter any difficulties, consider disabling `mold` as a
536
536
troubleshooting step.
537
537
538
538
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
540
540
times. Set up with:
541
541
542
542
On GNU/Linux:
543
543
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
+
544
547
``` bash
545
548
sudo apt install ccache mold # for Debian/Ubuntu, included in most Linux distros
546
549
export CC=" ccache gcc" # add to your .profile
547
550
export CXX=" ccache g++" # add to your .profile
548
551
export LDFLAGS=" -fuse-ld=mold" # add to your .profile
549
552
```
550
553
554
+ Refs:
555
+
556
+ 1 . < https://ccache.dev/performance.html >
557
+ 2 . < https://github.com/rui314/mold >
558
+
551
559
On macOS:
552
560
553
561
``` bash
554
- brew install ccache mold # see https://brew.sh
562
+ brew install ccache # see https://brew.sh
555
563
export CC=" ccache cc" # add to ~/.zshrc or other shell config file
556
564
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
558
565
```
559
566
560
567
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
572
579
configuration since the November 2020 version and allows for setting
573
580
breakpoints.
574
581
575
- Refs:
576
-
577
- 1 . < https://ccache.dev/performance.html >
578
- 2 . < https://github.com/rui314/mold >
579
-
580
582
#### Troubleshooting Unix and macOS builds
581
583
582
584
Stale builds can sometimes result in ` file not found ` errors while building.
0 commit comments