Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
54 changes: 54 additions & 0 deletions .configurations/configuration.dsc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
# Reference: https://github.com/nodejs/node/blob/main/BUILDING.md#windows
properties:
resources:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: pythonPackage
directives:
description: Install Python 3.12
module: Microsoft.WinGet.DSC
allowPrerelease: true
settings:
id: Python.Python.3.12
source: winget
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: vsPackage
directives:
description: Install Visual Studio 2022 Community
allowPrerelease: true
settings:
id: Microsoft.VisualStudio.2022.Community
source: winget
useLatest: true
- resource: Microsoft.VisualStudio.DSC/VSComponents
id: vsComponents
dependsOn:
- vsPackage
directives:
description: Install required VS workloads and components
allowPrerelease: true
settings:
productId: Microsoft.VisualStudio.Product.Community
channelId: VisualStudio.17.Release
includeRecommended: true
components:
- Microsoft.VisualStudio.Workload.NativeDesktop
- Microsoft.VisualStudio.Component.VC.Llvm.Clang
- Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: gitPackage
directives:
description: Install Git
allowPrerelease: true
settings:
id: Git.Git
source: winget
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: nasmPackage
directives:
description: Install NetWide Assembler (NASM)
allowPrerelease: true
settings:
id: Nasm.Nasm
source: winget
configurationVersion: 0.1.0
54 changes: 54 additions & 0 deletions .configurations/configuration.vsEnterprise.dsc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
# Reference: https://github.com/nodejs/node/blob/main/BUILDING.md#windows
properties:
resources:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: pythonPackage
directives:
description: Install Python 3.12
module: Microsoft.WinGet.DSC
allowPrerelease: true
settings:
id: Python.Python.3.12
source: winget
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: vsPackage
directives:
description: Install Visual Studio 2022 Enterprise
allowPrerelease: true
settings:
id: Microsoft.VisualStudio.2022.Enterprise
source: winget
useLatest: true
- resource: Microsoft.VisualStudio.DSC/VSComponents
id: vsComponents
dependsOn:
- vsPackage
directives:
description: Install required VS workloads and components
allowPrerelease: true
settings:
productId: Microsoft.VisualStudio.Product.Enterprise
channelId: VisualStudio.17.Release
includeRecommended: true
components:
- Microsoft.VisualStudio.Workload.NativeDesktop
- Microsoft.VisualStudio.Component.VC.Llvm.Clang
- Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: gitPackage
directives:
description: Install Git
allowPrerelease: true
settings:
id: Git.Git
source: winget
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: nasmPackage
directives:
description: Install NetWide Assembler (NASM)
allowPrerelease: true
settings:
id: Nasm.Nasm
source: winget
configurationVersion: 0.1.0
54 changes: 54 additions & 0 deletions .configurations/configuration.vsProfessional.dsc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# yaml-language-server: $schema=https://aka.ms/configuration-dsc-schema/0.2
# Reference: https://github.com/nodejs/node/blob/main/BUILDING.md#windows
properties:
resources:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: pythonPackage
directives:
description: Install Python 3.12
module: Microsoft.WinGet.DSC
allowPrerelease: true
settings:
id: Python.Python.3.12
source: winget
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: vsPackage
directives:
description: Install Visual Studio 2022 Professional
allowPrerelease: true
settings:
id: Microsoft.VisualStudio.2022.Professional
source: winget
useLatest: true
- resource: Microsoft.VisualStudio.DSC/VSComponents
id: vsComponents
dependsOn:
- vsPackage
directives:
description: Install required VS workloads and components
allowPrerelease: true
settings:
productId: Microsoft.VisualStudio.Product.Professional
channelId: VisualStudio.17.Release
includeRecommended: true
components:
- Microsoft.VisualStudio.Workload.NativeDesktop
- Microsoft.VisualStudio.Component.VC.Llvm.Clang
- Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: gitPackage
directives:
description: Install Git
allowPrerelease: true
settings:
id: Git.Git
source: winget
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: nasmPackage
directives:
description: Install NetWide Assembler (NASM)
allowPrerelease: true
settings:
id: Nasm.Nasm
source: winget
configurationVersion: 0.1.0
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"visualstudioexptteam.vscodeintellicode"
],
"image": "nodejs/devcontainer:nightly",
"initializeCommand": "docker system prune -f -a",
"settings": {
"terminal.integrated.profiles.linux": {
"zsh (login)": {
Expand Down
57 changes: 39 additions & 18 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ file a new issue.
* [OpenSSL asm support](#openssl-asm-support)
* [Previous versions of this document](#previous-versions-of-this-document)
* [Building Node.js on supported platforms](#building-nodejs-on-supported-platforms)
* [Note about Python](#note-about-python)
* [Prerequisites](#prerequisites)
* [Unix and macOS](#unix-and-macos)
* [Unix prerequisites](#unix-prerequisites)
* [macOS prerequisites](#macos-prerequisites)
Expand All @@ -33,7 +33,7 @@ file a new issue.
* [Speeding up frequent rebuilds when developing](#speeding-up-frequent-rebuilds-when-developing)
* [Troubleshooting Unix and macOS builds](#troubleshooting-unix-and-macos-builds)
* [Windows](#windows)
* [Prerequisites](#prerequisites)
* [Windows Prerequisites](#windows-prerequisites)
* [Option 1: Manual install](#option-1-manual-install)
* [Option 2: Automated install with Boxstarter](#option-2-automated-install-with-boxstarter)
* [Building Node.js](#building-nodejs-2)
Expand Down Expand Up @@ -123,7 +123,7 @@ platforms. This is true regardless of entries in the table below.

<!--lint disable final-definition-->

[^1]: Older kernel versions may work. However official Node.js release
[^1]: Older kernel versions may work. However, official Node.js release
binaries are [built on RHEL 8 systems](#official-binary-platforms-and-toolchains)
with kernel 4.18.

Expand Down Expand Up @@ -210,8 +210,7 @@ For use of AVX2,
* llvm version 3.3 or higher
* nasm version 2.10 or higher in Windows

Please refer to
<https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_ia32cap.html> for details.
Please refer to <https://docs.openssl.org/1.1.1/man3/OPENSSL_ia32cap/> for details.

If compiling without one of the above, use `configure` with the
`--openssl-no-asm` flag. Otherwise, `configure` will fail.
Expand All @@ -228,9 +227,10 @@ Consult previous versions of this document for older versions of Node.js:

## Building Node.js on supported platforms

### Note about Python
### Prerequisites

The Node.js project supports Python >= 3 for building and testing.
* Python support: the Node.js project supports Python >= 3.6 for building and testing.
* Memory: at least 8GB of RAM is typically required when compiling with 4 parallel jobs (e.g: `make -j4`)

### Unix and macOS

Expand All @@ -243,7 +243,7 @@ The Node.js project supports Python >= 3 for building and testing.

Installation via Linux package manager can be achieved with:

* Ubuntu, Debian: `sudo apt-get install python3 g++ make python3-pip`
* Ubuntu, Debian: `sudo apt-get install python3 g++-12 gcc-12 make python3-pip`
* Fedora: `sudo dnf install python3 gcc-c++ make python3-pip`
* CentOS and RHEL: `sudo yum install python3 gcc-c++ make python3-pip`
* OpenSUSE: `sudo zypper install python3 gcc-c++ make python3-pip`
Expand Down Expand Up @@ -271,6 +271,7 @@ fail.
To build Node.js:

```bash
export CXX=g++-12
./configure
make -j4
```
Expand Down Expand Up @@ -528,7 +529,7 @@ $ gdb /opt/node-debug/node core.node.8.1535359906
[ASan](https://github.com/google/sanitizers) can help detect various memory
related bugs. ASan builds are currently only supported on linux.
If you want to check it on Windows or macOS or you want a consistent toolchain
on Linux, you can try [Docker](https://www.docker.com/products/docker-desktop)
on Linux, you can try [Docker](https://www.docker.com/products/docker-desktop/)
(using an image like `gengjiawen/node-build:2020-02-14`).

The `--debug` is not necessary and will slow down build and testing, but it can
Expand Down Expand Up @@ -600,6 +601,11 @@ rebuild may take a lot more time than previous builds. Additionally,
ran `./configure` with non-default options (such as `--debug`), you will need
to run it again before invoking `make -j4`.

If you received the error `nodejs g++ fatal error compilation terminated cc1plus`
during compilation, this is likely a memory issue and you should either provide
more RAM or create swap space to accommodate toolchain requirements or reduce
the number of parallel build tasks (`-j<n>`).

### Windows

#### Tips
Expand All @@ -616,9 +622,13 @@ vcpkg owns zlib1.dll
vcpkg integrate remove
```

Refs: #24448, <https://github.com/microsoft/vcpkg/issues/37518>, [vcpkg](https://github.com/microsoft/vcpkg/)
Refs:

1. <https://github.com/nodejs/node/issues/24448>
2. <https://github.com/microsoft/vcpkg/issues/37518> / <https://github.com/microsoft/vcpkg/discussions/37546>
3. [vcpkg](https://github.com/microsoft/vcpkg/)

#### Prerequisites
#### Windows Prerequisites

##### Option 1: Manual install

Expand All @@ -645,6 +655,8 @@ Optional requirements to build the MSI installer package:
Optional requirements for compiling for Windows 10 on ARM (ARM64):

* Visual Studio 17.6.0 or newer
> **Note:** There is [a bug](https://github.com/nodejs/build/issues/3739) in `17.10.x`
> preventing Node.js from compiling.
* Visual Studio optional components
* Visual C++ compilers and libraries for ARM64
* Visual C++ ATL for ARM64
Expand All @@ -665,9 +677,9 @@ packages:
* [NetWide Assembler](https://chocolatey.org/packages/nasm)

To install Node.js prerequisites using
[Boxstarter WebLauncher](https://boxstarter.org/weblauncher), open
[Boxstarter WebLauncher](https://boxstarter.org/weblauncher), visit
<https://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/HEAD/tools/bootstrap/windows_boxstarter>
with Edge browser on the target machine.
with a supported browser.

Alternatively, you can use PowerShell. Run those commands from
an elevated (Administrator) PowerShell terminal:
Expand All @@ -691,6 +703,15 @@ disk space.
git clone https://github.com/nodejs/node.git
cd node
```

> \[!TIP]
> If you are building from a Windows machine, symlinks are disabled by default, and can be enabled by cloning
> with the `-c core.symlinks=true` flag.
>
> ```powershell
> git clone -c core.symlinks=true <repository_url>
> ```

* If the path to your build directory contains a space or a non-ASCII character,
the build will likely fail

Expand Down Expand Up @@ -733,7 +754,7 @@ architecture supports \[arm, arm64/aarch64, x86, x86\_64].

## `Intl` (ECMA-402) support

[Intl](https://github.com/nodejs/node/blob/HEAD/doc/api/intl.md) support is
[Intl](doc/api/intl.md) support is
enabled by default.

### Build with full ICU support (all locales supported by ICU)
Expand Down Expand Up @@ -799,7 +820,7 @@ that works for both your host and target environments.
### Build with a specific ICU

You can find other ICU releases at
[the ICU homepage](http://site.icu-project.org/download).
[the ICU homepage](https://icu.unicode.org/download).
Download the file named something like `icu4c-**##.#**-src.tgz` (or
`.zip`).

Expand Down Expand Up @@ -830,7 +851,7 @@ From a tarball URL:
#### Windows

First unpack latest ICU to `deps/icu`
[icu4c-**##.#**-src.tgz](http://site.icu-project.org/download) (or `.zip`)
[icu4c-**##.#**-src.tgz](https://icu.unicode.org/download) (or `.zip`)
as `deps/icu` (You'll have: `deps/icu/source/...`)

```powershell
Expand All @@ -853,10 +874,10 @@ configure option:
## Building Node.js with FIPS-compliant OpenSSL

Node.js supports FIPS when statically or dynamically linked with OpenSSL 3 via
[OpenSSL's provider model](https://www.openssl.org/docs/man3.0/man7/crypto.html#OPENSSL-PROVIDERS).
[OpenSSL's provider model](https://docs.openssl.org/3.0/man7/crypto/#OPENSSL-PROVIDERS).
It is not necessary to rebuild Node.js to enable support for FIPS.

See [FIPS mode](./doc/api/crypto.md#fips-mode) for more information on how to
See [FIPS mode](doc/api/crypto.md#fips-mode) for more information on how to
enable FIPS support in Node.js.

## Building Node.js with external core modules
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.15.1">20.15.1</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V20.md#20.19.2">20.19.2</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.19.1">20.19.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.19.0">20.19.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.18.3">20.18.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.18.2">20.18.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.18.1">20.18.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.18.0">20.18.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.17.0">20.17.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.16.0">20.16.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.15.1">20.15.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.15.0">20.15.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.14.0">20.14.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V20.md#20.13.1">20.13.1</a><br/>
Expand Down
8 changes: 3 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ works.
* [Code of Conduct](#code-of-conduct)
* [Issues](#issues)
* [Pull Requests](#pull-requests)
* [Developer's Certificate of Origin 1.1](#developers-certificate-of-origin)
* [Developer's Certificate of Origin 1.1](#developers-certificate-of-origin-11)

## [Code of Conduct](./doc/contributing/code-of-conduct.md)

Expand Down Expand Up @@ -47,11 +47,9 @@ dependencies, and tools contained in the `nodejs/node` repository.
* [Reviewing Pull Requests](./doc/contributing/pull-requests.md#reviewing-pull-requests)
* [Notes](./doc/contributing/pull-requests.md#notes)

<a id="developers-certificate-of-origin"></a>

## Developer's Certificate of Origin 1.1

<pre>
```text
By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
Expand All @@ -75,4 +73,4 @@ By making a contribution to this project, I certify that:
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
</pre>
```
Loading
Loading