node icon indicating copy to clipboard operation
node copied to clipboard

Support GN build without using depot_tools

Open zcbenz opened this issue 1 year ago • 3 comments

The GN build is documented at #51676, which however requires using depot_tools from Chromium for building, and the code of Node must be checked out in a specific directory structure.

To simplify the GN build for developers who don't work with Chromium, there has been an effort to make GN work without depot_tools:

  • The https://github.com/yue/build-gn is a fork of GN that bundles the build configurations of Chromium with it.
  • The https://github.com/photoionization/node_with_gn makes uses of the forked GN to build Node without depot_tools.

There are a few problems left for solving:

  • Maintaining the forked GN is a burden.
  • Even without the requirement of depot_tools, the GN build of V8 requires the following dependencies to exist:
    • abseil-cpp
    • icu
    • jinja2
    • markupsafe
    • zlib
  • The default configurations of V8 does not work with Node, and we must explicitly pass a list of GN args when generating the build files.

zcbenz avatar Feb 07 '24 05:02 zcbenz

the GN build of V8 requires the following dependencies to exist

Is it an issue even though we include the source of these dependencies in our tree?

targos avatar Feb 07 '24 06:02 targos

The GN files of V8 hardcodes paths to some dependencies to //third_party/xxx, I need to add args to allow changing them to //node/deps/xxx to fix them.

zcbenz avatar Feb 07 '24 08:02 zcbenz

OK for icu. The other ones are in the third_party directory.

targos avatar Feb 07 '24 09:02 targos