Skip to content

build,win,v8: allow precompiling objects-inl.h

This makes compiling v8_base much faster on Windows. On my machine, the total node build time drops from 25m29.597s to 10m58.554s.

This is enabled by default when using calling vcbuild without release or build-release (similar to ltcg). All node tests pass, but this force-includes objects-inl.h in every file for v8_base, so it is possible that this causes subtle issues and is thus disabled in CI and for releases. This includes only objects-inl.h to minimize the chance for issues, it is already included in many files. Adding other headers only improves the build time in the order of seconds.

Sharding is disabled because the header would have to be precompiled for each shard but is only once. The library is much smaller, so sharding is not necessary with this either way.

Can the changes in v8.gyp be floated on top of V8 updates, or does this need to be submitted upstream? Are we maintaining the gyp files? (cc @nodejs/v8-update)

cc @nodejs/platform-windows

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading