Remove unused GN Node.js arg

This was added in https://issues.chromium.org/issues/336962432.

The following error is otherwise produced:

 ./tools/gn-gen.py --target_cpu=arm64 out/Release
node_v8_path="//node/deps/v8"
target_cpu="arm64"
icu_use_data_file = false
is_debug=false
symbol_level=0
is_component_build=false
node_use_node_code_cache=true
node_enable_deprecated_declarations_warnings=true
v8_imminent_deprecation_warnings=false
WARNING at the command-line "--args":1:206: Build argument has no effect.
node_v8_path="//node/deps/v8" target_cpu="arm64" icu_use_data_file = false is_debug=false symbol_level=0 is_component_build=false node_use_node_code_cache=true node_enable_deprecated_declarations_warnings=true v8_imminent_deprecation_warnings=false

             ^---
The variable "node_enable_deprecated_declarations_warnings" was set as a build argument
but never appeared in a declare_args() block in any buildfile.

To view all possible args, run "gn args --list <out_dir>"

Bug: 42203738
Change-Id: I606818f012338854cabe1134248064585a942c36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/node-ci/+/5964917
Reviewed-by: Andreas Haas <[email protected]>
Reviewed-by: Michael Achenbach <[email protected]>
Commit-Queue: Andreas Haas <[email protected]>
1 file changed
tree: e3dcc764f5422c85bfe74d9948d80c9e244b9d53
  1. build_overrides/
  2. gn/
  3. node_tests/
  4. third_party/
  5. tools/
  6. .gitignore
  7. .gn
  8. BUILD.gn
  9. codereview.settings
  10. DEPS
  11. LICENSE
  12. Makefile
  13. README.md
README.md

Node.js built with GN

This project is a set of dependency and build configurations to build Node.js with GN.

Background

V8 was originally built with SCons. Following Chromium, it made the switch to GYP, completing around 2012. That was when Node.js started its success story. However, again following Chromium, V8 made the switch to GN, completing in 2016. So far, Node.js has hesitated in adopting GN. One of the reasons is its now established native modules ecosystem that relies on GYP for build configuration.

Electron, having both Chromium and Node.js as its dependencies, adopted GN. Many files in this repository have been derived from the Electron project, with appropriate changes to avoid the need for forking files, to implement a standalone build, or to fix test failures.

Some reading material:

Instructions

Checking out source

Get depot_tools first.

mkdir node-ci
cd node-ci
fetch node-ci

Alternatively, you can

mkdir node-ci
cd node-ci
git clone https://chromium.googlesource.com/v8/node-ci
gclient config https://chromium.googlesource.com/v8/node-ci --unmanaged

Build

cd node-ci
make deps
make node

Test

JOBS=4 make test

Advanced build configurations

For more advanced build options, check out tools/gn-gen.py --help.

Update dependencies

To update a dependency, e.g. V8 or Node.js, use gclient to update DEPS.

gclient setdep --var=v8_revision=<updated-git-hash>

To apply changes, e.g. for local testing, use git:

cd v8
git remote add local-v8 <path-to-v8-checkout>/.git
git fetch local-v8
git checkout local-v8/<your-branch>

Project priorities

  • Stay as slim as possible. By avoiding to fork files from dependencies, future maintenance becomes less a hassle.
  • Pull necessary sources as dependencies rather than checking in the sources.
  • Stay as up-to-date as possible. The point of this is to be able to build with newest versions of dependencies, including Node.js, V8, and ICU.
  • Simplicity. It should be easy to get up and running.

Not yet implemented

  • Support building on Windows. The current configurations have been tested for Linux and Mac.
  • Platform-specific OpenSSL build configurations. The current build only supports the slowest platform-independent configuration.

Explicit non-goals

  • To translate every configuration from the GYP build.
  • To support platforms not supported by Chromium.
  • To replace Node.js' test runner with the one used by V8.
  • To use GN to build native modules.

Advantages over upstream Node.js

  • Proper dependency management. Upgrading dependencies is just a small change in DEPS.
  • No need to port V8 changes to GYP.
  • Availability of sanitizers.
  • Ability to use GN features such as jumbo builds.
  • Toolchain to build is bundled as dependency.