From 3d0449171354ed8e94d5cff95ab35d619f8b53b1 Mon Sep 17 00:00:00 2001 From: Jonathan Darling Date: Thu, 1 Dec 2016 10:47:46 -0600 Subject: [PATCH] doc: add note to parallelize make Adds a note to the BUILDING doc to encourage parallelizing make. When I first built node I didn't know this trick and thought that the build was just stuck in an infinite loop after waiting for 10 minutes. Refs: https://github.com/nodejs/node/issues/8286 Refs: https://github.com/nodejs/node/pull/9881 PR-URL: https://github.com/nodejs/node/pull/9961 Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell Reviewed-By: Gibson Fahnestock Reviewed-By: Ben Noordhuis Reviewed-By: Stephen Belanger --- BUILDING.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index b1060744f75d24..b1962d53c2caf4 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -40,9 +40,17 @@ To build Node.js: ```console $ ./configure -$ make +$ make -j4 ``` +Running `make` with the `-j4` flag will cause it to run 4 compilation jobs +concurrently which may significantly reduce build time. The number after `-j` +can be changed to best suit the number of processor cores on your machine. If +you run into problems running `make` with concurrency, try running it without +the `-j4` flag. See the +[GNU Make Documentation](https://www.gnu.org/software/make/manual/html_node/Parallel.html) +for more information. + Note that the above requires that `python` resolve to Python 2.6 or 2.7 and not a newer version. To run the tests: