/usr/share/doc/nodejs/html/contributing
# Building Node.js with Ninja The purpose of this guide is to show how to build Node.js using [Ninja][], as doing so can be significantly quicker than using `make`. Please see [Ninja's site][Ninja] for installation instructions (Unix only). [Ninja][] is supported in the Makefile. Run `./configure --ninja` to configure the project to run the regular `make` commands with Ninja. 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 the project's root. When running `make`, you will see output similar to the following if the build has succeeded: ```console ninja: Entering directory `out/Release` [4/4] LINK node, POSTBUILDS ``` The bottom line will change while building, showing the progress as `[finished/total]` build steps. This is useful output that `make` does not produce and is one of the benefits of using Ninja. When using Ninja, builds are always run in parallel, based by default on the number of CPUs your system has. You can use the `-j` parameter to override this behavior, which is equivalent to the `-j` parameter in the regular `make`: ```bash make -j4 # With this flag, Ninja will limit itself to 4 parallel jobs, # regardless of the number of cores on the current machine. ``` ## Producing a debug build To create a debug build rather than a release build: ```bash ./configure --ninja --debug && make ``` ## Customizing `ninja` path On some systems (such as RHEL7 and below), the Ninja binary might be installed with a different name. For these systems use the `NINJA` env var: ```bash ./configure --ninja && NINJA="ninja-build" make ``` [Ninja]: https://ninja-build.org/
.
Edit
..
Edit
adding-new-napi-api.md
Edit
backporting-to-release-lines.md
Edit
building-node-with-ninja.md
Edit
code-of-conduct.md
Edit
collaborator-guide.md
Edit
commit-queue.md
Edit
components-in-core.md
Edit
cpp-style-guide.md
Edit
diagnostic-tooling-support-tiers.md
Edit
doc_img
Edit
feature-request-management.md
Edit
internal-api.md
Edit
investigating-native-memory-leaks.md
Edit
issues.md
Edit
maintaining-V8.md
Edit
maintaining-c-ares.md
Edit
maintaining-cjs-module-lexer.md
Edit
maintaining-dependencies.md
Edit
maintaining-http.md
Edit
maintaining-icu.md
Edit
maintaining-npm.md
Edit
maintaining-openssl.md
Edit
maintaining-root-certs.md
Edit
maintaining-shared-library-support.md
Edit
maintaining-the-build-files.md
Edit
maintaining-types-for-nodejs.md
Edit
maintaining-web-assembly.md
Edit
maintaining-zlib.md
Edit
node-postmortem-support.md
Edit
offboarding.md
Edit
primordials.md
Edit
pull-requests.md
Edit
releases.md
Edit
security-model-strategy.md
Edit
security-release-process.md
Edit
security-steward-on-off-boarding.md
Edit
static-analysis.md
Edit
strategic-initiatives.md
Edit
technical-priorities.md
Edit
technical-values.md
Edit
using-internal-errors.md
Edit
using-symbols.md
Edit
writing-and-running-benchmarks.md
Edit
writing-tests.md
Edit