From 33470d965cc56d08988df773af0100fade9b6c80 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Sun, 15 Oct 2023 18:55:36 +0800 Subject: [PATCH] doc: improve ccache explanation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ccache improves the build speed significantly only when the branch was built before. Building fresh branches with major changes are not benefited from ccache. PR-URL: https://github.com/nodejs/node/pull/50133 Fixes: https://github.com/nodejs/node/issues/49967 Reviewed-By: Yagiz Nizipli Reviewed-By: Antoine du Hamel Reviewed-By: Michaƫl Zasso --- BUILDING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index d1f00c3cfd42f2..fb2eed1376e3f9 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -543,7 +543,8 @@ 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. +This will allow for near-instantaneous rebuilds when switching branches back +and forth that were built with cache. When modifying only the JS layer in `lib`, it is possible to externally load it without modifying the executable: