2016-09-20 06:54:35 +02:00
# Building Node.js
2016-03-10 00:41:52 +01:00
2018-10-08 18:24:37 +02:00
Depending on what platform or features you need, the build process may
differ. After you've built a binary, running the
test suite to confirm that the binary works as intended is a good next step.
2016-03-10 00:41:52 +01:00
2018-10-08 18:24:37 +02:00
If you can reproduce a test failure, search for it in the
2016-03-10 00:41:52 +01:00
[Node.js issue tracker ](https://github.com/nodejs/node/issues ) or
file a new issue.
2018-09-28 16:45:44 +02:00
## Table of Contents
2018-10-20 03:33:00 +02:00
* [Supported platforms ](#supported-platforms )
* [Input ](#input )
* [Strategy ](#strategy )
* [Supported platforms ](#supported-platforms-1 )
* [Supported toolchains ](#supported-toolchains )
* [Unix ](#unix )
* [AIX ](#aix )
* [Windows ](#windows )
* [OpenSSL asm support ](#openssl-asm-support )
* [Building Node.js on supported platforms ](#building-nodejs-on-supported-platforms )
* [Unix/macOS ](#unixmacos )
* [Prerequisites ](#prerequisites )
* [Building Node.js ](#building-nodejs-1 )
* [Running Tests ](#running-tests )
2018-10-29 06:59:56 +01:00
* [Running Coverage ](#running-coverage )
2018-10-20 03:33:00 +02:00
* [Building the documentation ](#building-the-documentation )
* [Building a debug build ](#building-a-debug-build )
* [Windows ](#windows-1 )
* [Android/Android-based devices (e.g. Firefox OS) ](#androidandroid-based-devices-eg-firefox-os )
* [`Intl` (ECMA-402) support ](#intl-ecma-402-support )
* [Default: `small-icu` (English only) support ](#default-small-icu-english-only-support )
* [Build with full ICU support (all locales supported by ICU) ](#build-with-full-icu-support-all-locales-supported-by-icu )
* [Unix/macOS ](#unixmacos-1 )
* [Windows ](#windows-2 )
* [Building without Intl support ](#building-without-intl-support )
* [Unix/macOS ](#unixmacos-2 )
* [Windows ](#windows-3 )
* [Use existing installed ICU (Unix/macOS only) ](#use-existing-installed-icu-unixmacos-only )
* [Build with a specific ICU ](#build-with-a-specific-icu )
* [Unix/macOS ](#unixmacos-3 )
* [Windows ](#windows-4 )
* [Building Node.js with FIPS-compliant OpenSSL ](#building-nodejs-with-fips-compliant-openssl )
* [Building Node.js with external core modules ](#building-nodejs-with-external-core-modules )
* [Unix/macOS ](#unixmacos-4 )
* [Windows ](#windows-5 )
2018-09-28 16:45:44 +02:00
2017-03-17 22:34:54 +01:00
## Supported platforms
2018-01-05 00:37:53 +01:00
This list of supported platforms is current as of the branch/release to
2018-10-30 05:51:55 +01:00
which it belongs.
2017-03-17 22:34:54 +01:00
### Input
2018-10-12 02:15:15 +02:00
Node.js relies on V8 and libuv. We adopt a subset of their supported platforms.
2017-03-17 22:34:54 +01:00
### Strategy
2018-10-30 05:51:55 +01:00
There are three support tiers:
2017-03-17 22:34:54 +01:00
* **Tier 1**: Full test coverage and maintenance by the Node.js core team and
the broader community.
2018-10-30 05:51:55 +01:00
* **Tier 2**: Full test coverage. Limited maintenance, often provided by the
vendor of the platform.
* **Experimental**: May not compile or test suite may not pass.
These are often approaching Tier 2 support but are not quite ready.
There is at least one individual providing maintenance.
2017-03-17 22:34:54 +01:00
### Supported platforms
2018-01-05 00:37:53 +01:00
The community does not build or test against end-of-life distributions (EoL).
2018-11-08 07:43:45 +01:00
For production applications, run Node.js on supported platforms only.
2017-04-26 18:59:53 +02:00
2018-10-12 20:06:32 +02:00
| System | Support type | Version | Architectures | Notes |
| ------------ | ------------ | ------------------------------- | ---------------- | ----------------------------- |
| GNU/Linux | Tier 1 | kernel >= 2.6.32, glibc >= 2.12 | x64, arm | |
| GNU/Linux | Tier 1 | kernel >= 3.10, glibc >= 2.17 | arm64 | |
| macOS/OS X | Tier 1 | >= 10.11 | x64 | |
| Windows | Tier 1 | >= Windows 7/2008 R2/2012 R2 | x86, x64 | [2 ](#fn2 ),[3](#fn3),[4](#fn4) |
| SmartOS | Tier 2 | >= 15 < 16.4 | x86 , x64 | [1 ](#fn1 ) |
| FreeBSD | Tier 2 | >= 11 | x64 | |
| GNU/Linux | Tier 2 | kernel >= 3.13.0, glibc >= 2.19 | ppc64le >=power8 | |
| AIX | Tier 2 | >= 7.1 TL04 | ppc64be >=power7 | |
| GNU/Linux | Tier 2 | kernel >= 3.10, glibc >= 2.17 | s390x | |
| GNU/Linux | Experimental | kernel >= 2.6.32, glibc >= 2.12 | x86 | limited CI |
| Linux (musl) | Experimental | musl >= 1.0 | x64 | |
2017-03-17 22:34:54 +01:00
2018-08-16 23:39:52 +02:00
< em id = "fn1" > 1< / em > : The gcc4.8-libs package needs to be installed, because node
2017-03-17 22:34:54 +01:00
binaries have been built with GCC 4.8, for which runtime libraries are not
installed by default. For these node versions, the recommended binaries
are the ones available in pkgsrc, not the one available from nodejs.org.
Note that the binaries downloaded from the pkgsrc repositories are not
officially supported by the Node.js project, and instead are supported
by Joyent. SmartOS images >= 16.4 are not supported because
GCC 4.8 runtime libraries are not available in their pkgsrc repository
2018-10-30 18:31:18 +01:00
< em id = "fn2" > 2< / em > : Tier 1 support for building on Windows is only on 64-bit
hosts. Support is experimental for 32-bit hosts.
2018-08-16 23:39:52 +02:00
< em id = "fn3" > 3< / em > : On Windows, running Node.js in Windows terminal emulators
like `mintty` requires the usage of [winpty ](https://github.com/rprichard/winpty )
for the tty channels to work correctly (e.g. `winpty node.exe script.js` ).
2017-10-09 19:10:54 +02:00
In "Git bash" if you call the node shell alias (`node` without the `.exe`
extension), `winpty` is used automatically.
2018-08-16 23:39:52 +02:00
< em id = "fn4" > 4< / em > : The Windows Subsystem for Linux (WSL) is not directly
supported, but the GNU/Linux build process and binaries should work. The
community will only address issues that reproduce on native GNU/Linux
systems. Issues that only reproduce on WSL should be reported in the
[WSL issue tracker ](https://github.com/Microsoft/WSL/issues ). Running the
2018-10-12 02:15:15 +02:00
Windows binary (`node.exe`) in WSL is not recommended. It will not work
without workarounds such as stdio redirection.
2017-11-14 03:44:25 +01:00
2017-03-17 22:34:54 +01:00
### Supported toolchains
2018-10-30 18:31:18 +01:00
Depending on the host platform, the selection of toolchains may vary.
2017-03-17 22:34:54 +01:00
#### Unix
2017-06-05 10:53:54 +02:00
* GCC 4.9.4 or newer
2017-04-13 12:42:56 +02:00
* Clang 3.4.2 or newer
2017-03-17 22:34:54 +01:00
2018-04-19 16:47:49 +02:00
#### AIX
* GCC 6.3 or newer
2017-03-17 22:34:54 +01:00
#### Windows
2018-10-30 18:31:18 +01:00
* Visual Studio 2017 with the Windows 10 SDK on a 64-bit host.
2017-03-17 22:34:54 +01:00
2018-03-07 14:31:05 +01:00
#### OpenSSL asm support
2018-10-30 18:31:18 +01:00
OpenSSL-1.1.0 requires the following assembler version for use of asm
2018-04-23 14:26:28 +02:00
support on x86_64 and ia32.
2018-03-07 14:31:05 +01:00
* gas (GNU assembler) version 2.23 or higher
2018-11-08 07:43:45 +01:00
* Xcode version 5.0 or higher
2018-03-07 14:31:05 +01:00
* llvm version 3.3 or higher
* nasm version 2.10 or higher in Windows
2018-11-08 07:43:45 +01:00
If compiling without one of the above, use `configure` with the
`--openssl-no-asm` flag. Otherwise, `configure` will fail.
2018-03-07 14:31:05 +01:00
2018-10-12 02:15:15 +02:00
The forthcoming OpenSSL-1.1.1 will have different requirements. Please refer to
https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_ia32cap.html for details.
2018-03-07 14:31:05 +01:00
2017-03-17 22:34:54 +01:00
## Building Node.js on supported platforms
2016-03-10 00:41:52 +01:00
2018-11-08 07:43:45 +01:00
The [bootstrapping guide ](https://github.com/nodejs/node/blob/master/tools/bootstrap/README.md )
explains how to install all prerequisites.
2017-11-14 15:57:11 +01:00
2018-01-05 00:37:53 +01:00
### Unix/macOS
2016-03-10 00:41:52 +01:00
2018-01-09 12:34:11 +01:00
#### Prerequisites
2016-03-10 00:41:52 +01:00
2017-06-05 10:53:54 +02:00
* `gcc` and `g++` 4.9.4 or newer, or
* `clang` and `clang++` 3.4.2 or newer (macOS: latest Xcode Command Line Tools)
2016-03-10 00:41:52 +01:00
* Python 2.6 or 2.7
* GNU Make 3.81 or newer
2016-04-20 19:48:22 +02:00
2018-11-08 07:43:45 +01:00
On macOS, install the `Xcode Command Line Tools` by running
2017-05-28 12:57:35 +02:00
`xcode-select --install` . Alternatively, if you already have the full Xcode
installed, you can find them under the menu `Xcode -> Open Developer Tool ->
More Developer Tools...`. This step will install `clang` , `clang++` , and
`make` .
2016-12-03 07:56:01 +01:00
2018-02-12 08:31:55 +01:00
If the path to your build directory contains a space, the build will likely
fail.
2017-07-18 21:03:43 +02:00
2016-04-20 19:48:22 +02:00
On FreeBSD and OpenBSD, you may also need:
2016-09-03 05:23:21 +02:00
* libexecinfo
2016-03-10 00:41:52 +01:00
2018-01-09 12:34:11 +01:00
#### Building Node.js
2016-09-03 05:23:21 +02:00
To build Node.js:
2016-04-20 19:48:22 +02:00
2016-07-14 11:55:30 +02:00
```console
2016-03-10 00:41:52 +01:00
$ ./configure
2016-12-01 17:47:46 +01:00
$ make -j4
2016-03-10 00:41:52 +01:00
```
2018-11-08 07:43:45 +01:00
The `-j4` option will cause `make` to run 4 simultaneous compilation jobs which
may reduce build time. For more information, see the
[GNU Make Documentation ](https://www.gnu.org/software/make/manual/html_node/Parallel.html ).
2016-12-01 17:47:46 +01:00
2017-03-17 22:34:54 +01:00
Note that the above requires that `python` resolve to Python 2.6 or 2.7
and not a newer version.
2016-03-10 00:41:52 +01:00
2018-08-21 19:28:18 +02:00
After building, setting up [firewall rules ](tools/macos-firewall.sh ) can avoid
popups asking to accept incoming network connections when running tests.
Running the following script on macOS will add the firewall rules for the
executable `node` in the `out` directory and the symbolic `node` link in the
project's root directory.
```console
$ sudo ./tools/macos-firewall.sh
```
2018-01-09 12:34:11 +01:00
#### Running Tests
To verify the build:
```console
$ make test-only
```
At this point, you are ready to make code changes and re-run the tests.
2018-10-12 02:15:15 +02:00
If you are running tests before submitting a Pull Request, the recommended
2018-01-09 12:34:11 +01:00
command is:
2016-03-10 00:41:52 +01:00
2017-05-28 22:20:21 +02:00
```console
2018-04-17 02:46:25 +02:00
$ make -j4 test
2016-03-10 00:41:52 +01:00
```
2018-04-17 02:46:25 +02:00
`make -j4 test` does a full check on the codebase, including running linters and
2018-01-09 12:34:11 +01:00
documentation tests.
2018-10-29 06:59:56 +01:00
Make sure the linter does not report any issues and that all tests pass. Please
do not submit patches that fail either check.
If you want to run the linter without running tests, use
`make lint` /`vcbuild lint`. It will run both JavaScript linting and
C++ linting.
2018-10-12 20:06:32 +02:00
If you are updating tests and just want to run a single test to check it:
```text
$ python tools/test.py -J --mode=release parallel/test-stream2-transform
```
You can execute the entire suite of tests for a given subsystem
by providing the name of a subsystem:
```text
$ python tools/test.py -J --mode=release child-process
```
If you want to check the other options, please refer to the help by using
2018-10-20 03:33:00 +02:00
the `--help` option:
2018-10-12 20:06:32 +02:00
```text
$ python tools/test.py --help
```
You can usually run tests directly with node:
```text
$ ./node ./test/parallel/test-stream2-transform.js
```
2018-10-29 06:59:56 +01:00
Remember to recompile with `make -j4` in between test runs if you change code in
the `lib` or `src` directories.
2018-11-14 23:53:59 +01:00
The tests attempt to detect support for IPv6 and exclude IPv6 tests if
appropriate. If your main interface has IPv6 addresses, then your
loopback interface must also have '::1' enabled. For some default installations
on Ubuntu that does not seem to be the case. To enable '::1' on the
loopback interface on Ubuntu:
```bash
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
```
2018-10-29 06:59:56 +01:00
#### Running Coverage
2017-10-06 19:42:35 +02:00
2018-10-29 06:59:56 +01:00
It's good practice to ensure any code you add or change is covered by tests.
You can do so by running the test suite with coverage enabled:
2017-09-05 00:10:05 +02:00
```console
$ ./configure --coverage
$ make coverage
```
2018-10-29 06:59:56 +01:00
A detailed coverage report will be written to `coverage/index.html` for
JavaScript coverage and to `coverage/cxxcoverage.html` for C++ coverage
(if you only want to run the JavaScript tests then you do not need to run
the first command `./configure --coverage` ).
_Generating a test coverage report can take several minutes._
To collect coverage for a subset of tests you can set the `CI_JS_SUITES` and
`CI_NATIVE_SUITES` variables:
```text
$ CI_JS_SUITES=child-process CI_NATIVE_SUITES= make coverage
```
The above command executes tests for the `child-process` subsystem and
outputs the resulting coverage report.
2017-09-05 00:10:05 +02:00
The `make coverage` command downloads some tools to the project root directory
and overwrites the `lib/` directory. To clean up after generating the coverage
reports:
```console
2017-10-06 19:42:35 +02:00
$ make coverage-clean
2017-09-05 00:10:05 +02:00
```
2018-01-09 12:34:11 +01:00
#### Building the documentation
2016-03-10 00:41:52 +01:00
To build the documentation:
2015-11-18 23:40:03 +01:00
This will build Node.js first (if necessary) and then use it to build the docs:
2016-07-14 11:55:30 +02:00
```console
2016-03-10 00:41:52 +01:00
$ make doc
```
2017-08-18 20:36:33 +02:00
If you have an existing Node.js build, you can build just the docs with:
2015-11-18 23:40:03 +01:00
2016-07-14 11:55:30 +02:00
```console
2016-09-03 05:23:21 +02:00
$ NODE=/path/to/node make doc-only
2015-11-18 23:40:03 +01:00
```
2016-03-10 00:41:52 +01:00
To read the documentation:
2016-07-14 11:55:30 +02:00
```console
2016-03-10 00:41:52 +01:00
$ man doc/node.1
```
2018-03-13 16:12:40 +01:00
If you prefer to read the documentation in a browser,
run the following after `make doc` is finished:
```console
$ make docopen
```
This will open a browser with the documentation.
2016-03-10 00:41:52 +01:00
To test if Node.js was built correctly:
2016-07-14 11:55:30 +02:00
```console
2016-09-03 05:23:21 +02:00
$ ./node -e "console.log('Hello from Node.js ' + process.version)"
```
To install this version of Node.js into a system directory:
```console
$ [sudo] make install
2016-03-10 00:41:52 +01:00
```
2018-08-24 20:52:18 +02:00
#### Building a debug build
If you run into an issue where the information provided by the JS stack trace
is not enough, or if you suspect the error happens outside of the JS VM, you
can try to build a debug enabled binary:
```console
$ ./configure --debug
$ make -j4
```
`make` with `./configure --debug` generates two binaries, the regular release
one in `out/Release/node` and a debug binary in `out/Debug/node` , only the
release version is actually installed when you run `make install` .
To use the debug build with all the normal dependencies overwrite the release
version in the install directory:
``` console
$ make install --prefix=/opt/node-debug/
$ cp -a -f out/Debug/node /opt/node-debug/node
```
When using the debug binary, core dumps will be generated in case of crashes.
These core dumps are useful for debugging when provided with the
corresponding original debug binary and system information.
Reading the core dump requires `gdb` built on the same platform the core dump
2018-10-30 18:31:18 +01:00
was captured on (i.e. 64-bit `gdb` for `node` built on a 64-bit system, Linux
2018-08-24 20:52:18 +02:00
`gdb` for `node` built on Linux) otherwise you will get errors like
`not in executable format: File format not recognized` .
Example of generating a backtrace from the core dump:
``` console
$ gdb /opt/node-debug/node core.node.8.1535359906
$ backtrace
```
2016-03-10 00:41:52 +01:00
### Windows
Prerequisites:
* [Python 2.6 or 2.7 ](https://www.python.org/downloads/ )
2017-11-07 18:36:09 +01:00
* The "Desktop development with C++" workload from
[Visual Studio 2017 ](https://www.visualstudio.com/downloads/ ) or the
"Visual C++ build tools" workload from the
[Build Tools ](https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017 ),
with the default optional components.
2016-03-10 00:41:52 +01:00
* Basic Unix tools required for some tests,
[Git for Windows ](http://git-scm.com/download/win ) includes Git Bash
and tools which can be included in the global `PATH` .
2018-04-11 14:11:36 +02:00
* The [NetWide Assembler ](http://www.nasm.us/ ), for OpenSSL assembler modules.
If not installed in the default location, it needs to be manually added
2018-10-12 02:15:15 +02:00
to `PATH` . A build with the `openssl-no-asm` option does not need this.
2017-11-17 18:54:06 +01:00
* **Optional** (to build the MSI): the [WiX Toolset v3.11 ](http://wixtoolset.org/releases/ )
and the [Wix Toolset Visual Studio 2017 Extension ](https://marketplace.visualstudio.com/items?itemName=RobMensching.WixToolsetVisualStudio2017Extension ).
2016-03-10 00:41:52 +01:00
2018-02-12 08:31:55 +01:00
If the path to your build directory contains a space or a non-ASCII character,
the build will likely fail.
2017-07-18 21:03:43 +02:00
2016-07-14 11:55:30 +02:00
```console
2016-12-06 21:52:59 +01:00
> .\vcbuild
2016-03-10 00:41:52 +01:00
```
To run the tests:
2016-07-14 11:55:30 +02:00
```console
2017-01-16 17:25:00 +01:00
> .\vcbuild test
2016-03-10 00:41:52 +01:00
```
To test if Node.js was built correctly:
2016-07-14 11:55:30 +02:00
```console
2016-06-13 12:24:53 +02:00
> Release\node -e "console.log('Hello from Node.js', process.version)"
2016-03-10 00:41:52 +01:00
```
2018-01-05 00:37:53 +01:00
### Android/Android-based devices (e.g. Firefox OS)
2016-04-04 19:48:34 +02:00
2018-10-12 02:15:15 +02:00
Android is not a supported platform. Patches to improve the Android build are
welcome. There is no testing on Android in the current continuous integration
environment. The participation of people dedicated and determined to improve
Android building, testing, and support is encouraged.
2016-03-10 00:41:52 +01:00
2017-04-01 10:07:31 +02:00
Be sure you have downloaded and extracted
[Android NDK ](https://developer.android.com/tools/sdk/ndk/index.html ) before in
a folder. Then run:
2016-03-10 00:41:52 +01:00
2016-07-14 11:55:30 +02:00
```console
2016-03-10 00:41:52 +01:00
$ ./android-configure /path/to/your/android-ndk
$ make
```
### `Intl` (ECMA-402) support:
2018-06-16 19:43:50 +02:00
[Intl ](https://github.com/nodejs/node/blob/master/doc/api/intl.md ) support is
2016-04-09 04:03:24 +02:00
enabled by default, with English data only.
2016-03-10 00:41:52 +01:00
2016-04-09 04:03:24 +02:00
#### Default: `small-icu` (English only) support
2016-03-10 00:41:52 +01:00
2016-04-09 04:03:24 +02:00
By default, only English data is included, but
the full `Intl` (ECMA-402) APIs. It does not need to download
any dependencies to function. You can add full
2016-03-10 00:41:52 +01:00
data at runtime.
#### Build with full ICU support (all locales supported by ICU):
With the `--download=all` , this may download ICU if you don't have an
2016-04-09 04:03:24 +02:00
ICU in `deps/icu` . (The embedded `small-icu` included in the default
Node.js source does not include all locales.)
2016-03-10 00:41:52 +01:00
2018-01-05 00:37:53 +01:00
##### Unix/macOS:
2016-03-10 00:41:52 +01:00
2016-07-14 11:55:30 +02:00
```console
2016-03-10 00:41:52 +01:00
$ ./configure --with-intl=full-icu --download=all
```
##### Windows:
2016-07-14 11:55:30 +02:00
```console
2017-01-16 17:25:00 +01:00
> .\vcbuild full-icu download-all
2016-03-10 00:41:52 +01:00
```
#### Building without Intl support
2016-04-09 04:03:24 +02:00
The `Intl` object will not be available, nor some other APIs such as
`String.normalize` .
2016-03-10 00:41:52 +01:00
2018-01-05 00:37:53 +01:00
##### Unix/macOS:
2016-03-10 00:41:52 +01:00
2016-07-14 11:55:30 +02:00
```console
2016-04-09 04:03:24 +02:00
$ ./configure --without-intl
2016-03-10 00:41:52 +01:00
```
##### Windows:
2016-07-14 11:55:30 +02:00
```console
2017-01-16 17:25:00 +01:00
> .\vcbuild without-intl
2016-03-10 00:41:52 +01:00
```
2018-01-05 00:37:53 +01:00
#### Use existing installed ICU (Unix/macOS only):
2016-03-10 00:41:52 +01:00
2016-07-14 11:55:30 +02:00
```console
2016-03-10 00:41:52 +01:00
$ pkg-config --modversion icu-i18n & & ./configure --with-intl=system-icu
```
2018-10-30 18:31:18 +01:00
If you are cross-compiling, your `pkg-config` must be able to supply a path
2016-03-10 00:41:52 +01:00
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://icu-project.org/download ).
Download the file named something like `icu4c-**##.#**-src.tgz` (or
`.zip` ).
2018-06-08 22:57:32 +02:00
To check the minimum recommended ICU, run `./configure --help` and see
the help for the `--with-icu-source` option. A warning will be printed
during configuration if the ICU version is too old.
2018-01-05 00:37:53 +01:00
##### Unix/macOS
2016-03-10 00:41:52 +01:00
2016-07-14 11:55:30 +02:00
From an already-unpacked ICU:
```console
2016-03-10 00:41:52 +01:00
$ ./configure --with-intl=[small-icu,full-icu] --with-icu-source=/path/to/icu
2016-07-14 11:55:30 +02:00
```
2016-03-10 00:41:52 +01:00
2016-07-14 11:55:30 +02:00
From a local ICU tarball:
```console
2016-03-10 00:41:52 +01:00
$ ./configure --with-intl=[small-icu,full-icu] --with-icu-source=/path/to/icu.tgz
2016-07-14 11:55:30 +02:00
```
2016-03-10 00:41:52 +01:00
2016-07-14 11:55:30 +02:00
From a tarball URL:
```console
2016-03-10 00:41:52 +01:00
$ ./configure --with-intl=full-icu --with-icu-source=http://url/to/icu.tgz
```
##### Windows
First unpack latest ICU to `deps/icu`
[icu4c-**##.#**-src.tgz ](http://icu-project.org/download ) (or `.zip` )
as `deps/icu` (You'll have: `deps/icu/source/...` )
2016-07-14 11:55:30 +02:00
```console
2017-01-16 17:25:00 +01:00
> .\vcbuild full-icu
2016-03-10 00:41:52 +01:00
```
## Building Node.js with FIPS-compliant OpenSSL
2018-03-07 14:31:05 +01:00
This version of Node.js does not support FIPS.
2017-12-16 06:19:16 +01:00
## Building Node.js with external core modules
It is possible to specify one or more JavaScript text files to be bundled in
2018-10-30 18:31:18 +01:00
the binary as built-in modules when building Node.js.
2017-12-16 06:19:16 +01:00
2018-05-30 12:21:20 +02:00
### Unix/macOS
2017-12-16 06:19:16 +01:00
This command will make `/root/myModule.js` available via
`require('/root/myModule')` and `./myModule2.js` available via
`require('myModule2')` .
```console
$ ./configure --link-module '/root/myModule.js' --link-module './myModule2.js'
```
### Windows
2018-05-16 13:59:48 +02:00
To make `./myModule.js` available via `require('myModule')` and
`./myModule2.js` available via `require('myModule2')` :
2017-12-16 06:19:16 +01:00
```console
2018-05-16 13:59:48 +02:00
> .\vcbuild link-module './myModule.js' link-module './myModule2.js'
2017-12-16 06:19:16 +01:00
```
2018-08-10 18:10:24 +02:00
## Note for downstream distributors of Node.js
The Node.js ecosystem is reliant on ABI compatibility within a major
release. To maintain ABI compatibility it is required that production
builds of Node.js will be built against the same version of dependencies as the
project vendors. If Node.js is to be built against a different version of a
dependency please create a custom `NODE_MODULE_VERSION` to ensure ecosystem
compatibility. Please consult with the TSC by opening an issue at
https://github.com/nodejs/tsc/issues if you decide to create a custom
`NODE_MODULE_VERSION` so we can avoid duplication in the ecosystem.