From 0f0bc98ad7cd1b8fb7bf2623cbe4754ba6218d91 Mon Sep 17 00:00:00 2001 From: jakecastelli <38635403+jakecastelli@users.noreply.github.com> Date: Sat, 18 May 2024 00:09:44 +0930 Subject: [PATCH] doc: improve ninja build for --built-in-modules-path The current ninja build does not work with `--node-builtin-modules-path` flag without passing `--ninja` as it will use `make` to build from scratch again. PR-URL: https://github.com/nodejs/node/pull/53007 Reviewed-By: Luigi Pinca Reviewed-By: Antoine du Hamel Reviewed-By: Marco Ippolito --- doc/contributing/building-node-with-ninja.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/contributing/building-node-with-ninja.md b/doc/contributing/building-node-with-ninja.md index 01a04c3c2cfbe2..ddb1fc74d4a00a 100644 --- a/doc/contributing/building-node-with-ninja.md +++ b/doc/contributing/building-node-with-ninja.md @@ -7,6 +7,12 @@ doing so can be significantly quicker than using `make`. Please see [Ninja][] is supported in the Makefile. Run `./configure --ninja` to configure the project to run the regular `make` commands with Ninja. +When modifying only the JS layer in `lib`, you can use: + +```bash +./configure --ninja --node-builtin-modules-path "$(pwd)" +``` + For example, `make` will execute `ninja -C out/Release` internally to produce a compiled release binary, It will also execute `ln -fs out/Release/node node`, so that you can execute `./node` at