-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V8 is rebuilt every time when building a debug build #16367
Comments
No need to revert, the following patch solves the rebuilding problem: diff --git a/common.gypi b/common.gypi
index 726b234aa5..34f681b988 100644
--- a/common.gypi
+++ b/common.gypi
@@ -120,6 +120,7 @@
'BasicRuntimeChecks': 3, # /RTC1
'AdditionalOptions': [
'/bigobj', # prevent error C1128 in VS2015
+ '/MP', # compile across multiple CPUs
],
},
'VCLinkerTool': {
@@ -175,6 +176,9 @@
'EnableFunctionLevelLinking': 'true',
'EnableIntrinsicFunctions': 'true',
'RuntimeTypeInfo': 'false',
+ 'AdditionalOptions': [
+ '/MP', # compile across multiple CPUs
+ ],
},
'VCLibrarianTool': {
'AdditionalOptions': [
@@ -207,9 +211,6 @@
# and their sheer number drowns out other, more legitimate warnings.
'DisableSpecificWarnings': ['4267'],
'WarnAsError': 'false',
- 'AdditionalOptions': [
- '/MP', # compile across multiple CPUs
- ],
},
'VCLibrarianTool': {
}, Trying to figure out why. |
Okay I've figured it out (more or less). GYP generates 4 diff --git a/deps/v8/src/v8_base_3.vcxproj b/deps/v8/src/v8_base_3.vcxproj
index 77f8df3528..71246bc1a5 100644
--- a/deps/v8/src/v8_base_3.vcxproj
+++ b/deps/v8/src/v8_base_3.vcxproj
@@ -54,7 +54,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..;..\..\..;$(OutDir)obj\global_intermediate;..\include;..\..\..\deps\icu-small\source\i18n;..\..\..\deps\icu-small\source\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>/bigobj /MP %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions>/MP /bigobj %(AdditionalOptions)</AdditionalOptions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -95,6 +95,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..;..\..\..;$(OutDir)obj\global_intermediate;..\include;..\..\..\deps\icu-small\source\i18n;..\..\..\deps\icu-small\source\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4267;4351;4355;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
@@ -181,6 +182,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..;..\..\..;$(OutDir)obj\global_intermediate;..\include;..\..\..\deps\icu-small\source\i18n;..\..\..\deps\icu-small\source\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
<BufferSecurityCheck>true</BufferSecurityCheck>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4267;4351;4355;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
Why does Why does GYP generate Is it worth trying to get GYP fixed (is it even still maintained?) or is it more worthwhile to just introduce the workaround? |
Gyp is still maintained, but Chromium doesn't use it anymore. And V8 is ceasing Gyp support soon, cc @hashseed. |
Setting /MP globally causes it to appear twice in the command line due to a GYP bug, which causes the project to be rebuilt unconditionally due to an msbuild bug. PR-URL: nodejs/node#16415 Fixes: nodejs/node#16367 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
Setting /MP globally causes it to appear twice in the command line due to a GYP bug, which causes the project to be rebuilt unconditionally due to an msbuild bug. PR-URL: #16415 Fixes: #16367 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
Setting /MP globally causes it to appear twice in the command line due to a GYP bug, which causes the project to be rebuilt unconditionally due to an msbuild bug. PR-URL: #16415 Fixes: #16367 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
Setting /MP globally causes it to appear twice in the command line due to a GYP bug, which causes the project to be rebuilt unconditionally due to an msbuild bug. PR-URL: #16415 Fixes: #16367 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
Setting /MP globally causes it to appear twice in the command line due to a GYP bug, which causes the project to be rebuilt unconditionally due to an msbuild bug. PR-URL: #16415 Fixes: #16367 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
Setting /MP globally causes it to appear twice in the command line due to a GYP bug, which causes the project to be rebuilt unconditionally due to an msbuild bug. PR-URL: #16415 Fixes: #16367 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
Setting /MP globally causes it to appear twice in the command line due to a GYP bug, which causes the project to be rebuilt unconditionally due to an msbuild bug. PR-URL: nodejs/node#16415 Fixes: nodejs/node#16367 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
After #16333 landed, every time you try to build a debug build using either
vcbuild
or Visual Studio, V8 gets rebuilt. I'm not sure why the/MP
switch is causing this. Perhaps someone more familiar with V8 can help investigate this. If we can't figure it out, I'll submit a revert PR.cc @nodejs/platform-windows
The text was updated successfully, but these errors were encountered: