-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Enable building with Ninja #6780
Conversation
@nodejs/build |
I know there is a guide that @Fishrock123 was working on. |
/cc @thlorenz I didn't think we needed anything new to make it work with ninja? |
For background/posterity, configure had a That's not an issue when you run it as |
The guide landed in core about two months ago: https://github.com/nodejs/node/blob/master/doc/guides/building-node-with-ninja.md The above is a more reliable way of running Ninja, without having to interact with
Sounds about right. If you really care about compile times, using ccache, even with I'm not opposed to adding the configure flag for it, but you'll still need to be doing other stuff manually. |
Actually, in the grand scheme of things, won't you still need to run If so... there's not much difference: ./configure --ninja
tools/gyp_node.py
ninja -C out/Release
ln -fs out/Release/node node vs... ./configure
tools/gyp_node.py -f ninja
ninja -C out/Release
ln -fs out/Release/node node |
No, configure runs it at the very end, so with this patch the second step would be unnecessary. I'm wondering if it's possible to express creating the node symlink in the source tree root directory in gyp so that the last step would be unnecessary too? And continuing on that though train, things such as the FWIW, I'd be fine with just closing this PR, I was basically unaware of the guide you linked to. :) |
Hey, I'd be all for removing a step -- this seems like a good idea to me. |
Great! So what else should I do here? I tried to move symlinking Should I also update the guide for building with Ninja? |
@ehsan I'd be ok with updating the guide here with just this for now, and the investigating the other things after. |
@nodejs/build any objections even if the configure option doesn't work with |
@Fishrock123 seeing how the |
Updated the guide in the new version of the patch. |
parser.add_option('--ninja', | ||
action='store_true', | ||
dest='use_ninja', | ||
help='generate a Ninja based build system') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like it produces the build system itself, could we clarify this to be like the xcode one? (Also per @jbergstroem's comment)
LGTM minus a nit. :) |
@Fishrock123 I originally had the string message say "generate build files for use with Ninja" to mirror the xcode message, and changed it according to my understanding of @jbergstroem's comment. Can you please let me know what string you'd prefer me to use here? Thanks! |
I think "generate build files for use with Ninja" should be fine. If it was the originally, oops. It was probably a reaction to my comment which wasn't well grounded anyways. |
Ninja is a build backend supported by gyp which is much faster than make and is able to parallelize builds across all of the available cores very well. On my machine, this reduces the average build time from 5:14 minutes to 4:33 minutes.
Addressed the comment in 55321ab. |
LGTM |
Ninja is a build backend supported by gyp which is much faster than Make and is able to parallelize builds across all of the available cores very well. On my machine, this reduces the average build time from 5:14 minutes to 4:33 minutes. Refs: nodejs#467 Refs: de224d6 PR-URL: nodejs#6780 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Thanks! Landed in de50202 with an updated commit message of |
Ninja is a build backend supported by gyp which is much faster than Make and is able to parallelize builds across all of the available cores very well. On my machine, this reduces the average build time from 5:14 minutes to 4:33 minutes. Refs: nodejs#467 Refs: de224d6 PR-URL: nodejs#6780 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Ninja is a build backend supported by gyp which is much faster than Make and is able to parallelize builds across all of the available cores very well. On my machine, this reduces the average build time from 5:14 minutes to 4:33 minutes. Refs: #467 Refs: de224d6 PR-URL: #6780 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
@Fishrock123 lts? |
ping @Fishrock123 |
lts could be good |
Ninja is a build backend supported by gyp which is much faster than Make and is able to parallelize builds across all of the available cores very well. On my machine, this reduces the average build time from 5:14 minutes to 4:33 minutes. Refs: #467 Refs: de224d6 PR-URL: #6780 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Ninja is a build backend supported by gyp which is much faster than Make and is able to parallelize builds across all of the available cores very well. On my machine, this reduces the average build time from 5:14 minutes to 4:33 minutes. Refs: #467 Refs: de224d6 PR-URL: #6780 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Ninja is a build backend supported by gyp which is much faster than Make and is able to parallelize builds across all of the available cores very well. On my machine, this reduces the average build time from 5:14 minutes to 4:33 minutes. Refs: #467 Refs: de224d6 PR-URL: #6780 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Ninja is a build backend supported by gyp which is much faster than Make and is able to parallelize builds across all of the available cores very well. On my machine, this reduces the average build time from 5:14 minutes to 4:33 minutes. Refs: #467 Refs: de224d6 PR-URL: #6780 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Checklist
Affected core subsystem(s)
build
Description of change
Ninja is a build backend supported by gyp which is much faster than make
and is able to parallelize builds across all of the available cores very
well. On my machine, this reduces the average build time from 5:14
minutes to 4:33 minutes.