Skip to content

deps,win: set MSVS .obj folders in gyp for V8

When V8 was updated to 5.7 and 5.8, there were issues compiling on Windows because of what was later discovered to be a filename conflict. This PR should avoid the issue in case it reoccurs when updating V8, without the need to change the number of shards.

Building on Windows fails depending on the result from sharding the deps/v8/src/v8.gyp:v8_base target. If two source files with the same name are in the same shard, their output object file path would conflict with one another. One example of this conflict is v8_base's runtime/runtime.cc and the V8 inspector's protocol/Runtime.cpp that is generated at build time, for which the files runtime.obj and Runtime.obj would be created, but MSVS overwrites one of them with the other.

Dividing the .obj output path by the original source's extension prevents this overwrite.

Refs: https://github.com/nodejs/node/pull/12784 Refs: https://github.com/nodejs/node/pull/12184 Refs: https://github.com/nodejs/node/pull/11752 Fixes: https://github.com/nodejs/v8/issues/4

/cc @nodejs/v8

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

deps,V8,build,windows

Merge request reports

Loading