-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc: add guide on maintaining the build files #16975
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Maintaining the Build files | ||
|
||
This document explains how to maintain the build files in the codebase. | ||
|
||
## Overview | ||
|
||
On how to build the Node.js core, see [Building Node.js](../../BUILDING.md). | ||
|
||
There are three main build files that may be directly run when building Node.js: | ||
|
||
- `configure`: A Python 2 script that detects system capabilities and runs | ||
[GYP][]. It generates `config.gypi` which includes parameters used by GYP to | ||
create platform-dependent build files. Its output is usually in one of these | ||
formats: Makefile, MSbuild, ninja, or XCode project files. (Note: the main | ||
Makefile mentioned below is maintained separately by humans). For a detailed | ||
guide on this script, see [configure](#configure). | ||
- `vcbuild.bat`: A Windows Batch Script that locates build tools, provides a | ||
subset of the targets avilable in the [Makefile](#makefile), and a few targets | ||
of its own. For a detailed guide on this script, see | ||
[vcbuild.bat](#vcbuild.bat). | ||
- `Makefile`: A Makefile that can be run with GNU Make. It provides a set of | ||
targets that build and test the Node.js binary, produce releases and | ||
documentation, and interact with the CI to run benchmarks or tests. For a | ||
detailed guide on this file, see [Makefile](#makefile). | ||
|
||
On Windows `vcbuild.bat` runs [configure](#configure) before building the | ||
Node.js binary, on other systems `configure` must be run manually before running | ||
`make` on the `Makefile`. | ||
|
||
## vcbuild.bat | ||
|
||
To see the help text, run `.\vcbuild help`. Update this file when you need to | ||
update the build and testing process on Windows. | ||
|
||
## configure | ||
|
||
To see the help text, run `python configure --help`. Update this file when you | ||
need to update the configuration process. | ||
|
||
## Makefile | ||
|
||
To see the help text, run `make help`. This file is not generated, it is | ||
maintained by humans. Note that this is not usually run on Windows, where | ||
[vcbuild.bat](#vcbuild.bat) is used instead. | ||
|
||
### Options | ||
|
||
- `-j <n>`: number of threads used to build the binary. Note that on the non-ci | ||
targets, the parallel tests will take up all the available cores, regardless | ||
of this option. | ||
|
||
[GYP]: https://gyp.gsrc.io/docs/UserDocumentation.md |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Missing link
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.
Ooops, deleted by accident, thanks for catching that.