diff --git a/BUILDING.md b/BUILDING.md index 94bdfaf60fc446..ddbc8682940aad 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -519,12 +519,20 @@ $ 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: -```console -$ sudo apt install ccache # for Debian/Ubuntu, included in most Linux distros -$ ccache -o cache_dir= -$ ccache -o max_size=5.0G -$ export CC="ccache gcc" # add to your .profile -$ export CXX="ccache g++" # add to your .profile +On GNU/Linux: + +```bash +sudo apt install ccache # for Debian/Ubuntu, included in most Linux distros +export CC="ccache gcc" # add to your .profile +export CXX="ccache g++" # add to your .profile +``` + +On macOS: + +```bash +brew install ccache # see https://brew.sh +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.