Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2021-10-21 20:06:49 +0300
committerRich Trott <rtrott@gmail.com>2021-10-24 16:59:20 +0300
commitedd716beb1c8d620f8b1edf547ea0eea119adf38 (patch)
tree719be6d324f431b3c40e5eab8a2e58a659f9c05d /BUILDING.md
parent40d890d31d6f7c61481566446a7a28d15e0eb4fc (diff)
doc: fix macOS environment variables for ccache
macOS requires `cc` and `c++` rather than `gcc` and `g++`. Closes: https://github.com/nodejs/node/issues/40542 PR-URL: https://github.com/nodejs/node/pull/40550 Fixes: https://github.com/nodejs/node/issues/40542 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'BUILDING.md')
-rw-r--r--BUILDING.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/BUILDING.md b/BUILDING.md
index 94bdfaf60fc..88addb5a8bf 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -519,6 +519,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:
+
```console
$ sudo apt install ccache # for Debian/Ubuntu, included in most Linux distros
$ ccache -o cache_dir=<tmp_dir>
@@ -527,6 +529,16 @@ $ export CC="ccache gcc" # add to your .profile
$ export CXX="ccache g++" # add to your .profile
```
+On macOS:
+
+```console
+$ brew install ccache # see https://brew.sh
+$ 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