Skip to content


Browse files Browse the repository at this point in the history
doc: fix macOS environment variables for ccache
macOS requires `cc` and `c++` rather than `gcc` and `g++`.

Closes: #40542

PR-URL: #40550
Fixes: #40542
Reviewed-By: Geoffrey Booth <>
Reviewed-By: Antoine du Hamel <>
Reviewed-By: Luigi Pinca <>
  • Loading branch information
Trott authored and BethGriggs committed Nov 24, 2021
1 parent 2d4a042 commit 5593dd1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions
Expand Up @@ -523,6 +523,8 @@ $ make test-only
If you plan to frequently rebuild Node.js, especially if using several branches,
installing `ccache` can help to greatly reduce build times. Set up with:

On GNU/Linux:

$ sudo apt install ccache # for Debian/Ubuntu, included in most Linux distros
$ ccache -o cache_dir=<tmp_dir>
Expand All @@ -531,6 +533,16 @@ $ export CC="ccache gcc" # add to your .profile
$ export CXX="ccache g++" # add to your .profile

On macOS:

$ brew install ccache # see
$ ccache -o cache_dir=<tmp_dir>
$ ccache -o max_size=5.0G
$ export CC="ccache cc" # add to ~/.zshrc or other shell config file
$ export CXX="ccache c++" # add to ~/.zshrc or other shell config file

This will allow for near-instantaneous rebuilds even when switching branches.

When modifying only the JS layer in `lib`, it is possible to externally load it
Expand Down

0 comments on commit 5593dd1

Please sign in to comment.