Skip to content

Commit 3bef2af

Browse files
jaimecbernardoCommit Bot
authored andcommitted
[build] Set MSVS .obj folders in gyp for v8_base
Building on Windows with gyp fails depending on the result from sharding the 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: nodejs/node#13959 Bug: Change-Id: I158e6178f2511297899ee50ea159f574916f903f Reviewed-on: https://chromium-review.googlesource.com/556599 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#46354}
1 parent 89154bf commit 3bef2af

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Hirofumi Mako <mkhrfm@gmail.com>
7070
Honggyu Kim <honggyu.kp@gmail.com>
7171
Ioseb Dzmanashvili <ioseb.dzmanashvili@gmail.com>
7272
Isiah Meadows <impinball@gmail.com>
73+
Jaime Bernardo <jaime@janeasystems.com>
7374
Jan de Mooij <jandemooij@gmail.com>
7475
Jay Freeman <saurik@saurik.com>
7576
James Pike <g00gle@chilon.net>

src/v8.gyp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,6 +1803,13 @@
18031803
# limit. This breaks it into multiple pieces to avoid the limit.
18041804
# See http://crbug.com/485155.
18051805
'msvs_shard': 4,
1806+
# This will prevent V8's .cc files conflicting with the inspector's
1807+
# .cpp files in the same shard.
1808+
'msvs_settings': {
1809+
'VCCLCompilerTool': {
1810+
'ObjectFile':'$(IntDir)%(Extension)\\',
1811+
},
1812+
},
18061813
}],
18071814
['component=="shared_library"', {
18081815
'defines': [

0 commit comments

Comments
 (0)