From d2219e53ecb55547a336e1b4c8d338c51032bb11 Mon Sep 17 00:00:00 2001 From: Nikolai Vavilov Date: Mon, 23 Oct 2017 19:37:03 +0300 Subject: [PATCH] build,win: set /MP separately in Debug and Release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/nodejs/node/pull/16415 Fixes: https://github.com/nodejs/node/issues/16367 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: Minwoo Jung Reviewed-By: Tobias Nießen Reviewed-By: Refael Ackermann --- common.gypi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common.gypi b/common.gypi index 05c1a0ce872f61..50fd3d1bd866b1 100644 --- a/common.gypi +++ b/common.gypi @@ -112,6 +112,7 @@ 'BasicRuntimeChecks': 3, # /RTC1 'AdditionalOptions': [ '/bigobj', # prevent error C1128 in VS2015 + '/MP', # compile across multiple CPUs ], }, 'VCLinkerTool': { @@ -167,6 +168,9 @@ 'EnableFunctionLevelLinking': 'true', 'EnableIntrinsicFunctions': 'true', 'RuntimeTypeInfo': 'false', + 'AdditionalOptions': [ + '/MP', # compile across multiple CPUs + ], }, 'VCLibrarianTool': { 'AdditionalOptions': [ @@ -199,9 +203,6 @@ # and their sheer number drowns out other, more legitimate warnings. 'DisableSpecificWarnings': ['4267'], 'WarnAsError': 'false', - 'AdditionalOptions': [ - '/MP', # compile across multiple CPUs - ], }, 'VCLibrarianTool': { },