From 62d3d325e853a40001661c32df2983bd5c80af53 Mon Sep 17 00:00:00 2001 From: KVS85 Date: Tue, 28 May 2019 18:53:27 +0300 Subject: [PATCH] Add /Z7 switch to V8 gyp (#9127) --- 3rdParty/V8/CMakeLists.txt | 6 ++++++ 3rdParty/V8/v7.1.302.28/gypfiles/standalone.gypi | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/3rdParty/V8/CMakeLists.txt b/3rdParty/V8/CMakeLists.txt index 56e00a2a09..82a222e3ad 100644 --- a/3rdParty/V8/CMakeLists.txt +++ b/3rdParty/V8/CMakeLists.txt @@ -123,6 +123,12 @@ if (WIN32) MESSAGE(STATUS "Building V8 for Windows with MSBUILD") set(GYP_MAIN gypfiles/gyp_v8) + if (USE_CLCACHE_MODE) + list(APPEND V8_GYP_ARGS "-Duse_clcache_mode=true") + else () + list(APPEND V8_GYP_ARGS "-Duse_clcache_mode=false") + endif() + if (${CMAKE_GENERATOR} MATCHES "2013") # try to find 2013 in 'Visual Studio 12 2013 Win64' set(GYP_MSVS_VERSION "2013") diff --git a/3rdParty/V8/v7.1.302.28/gypfiles/standalone.gypi b/3rdParty/V8/v7.1.302.28/gypfiles/standalone.gypi index cd7d2f904c..6c07087807 100644 --- a/3rdParty/V8/v7.1.302.28/gypfiles/standalone.gypi +++ b/3rdParty/V8/v7.1.302.28/gypfiles/standalone.gypi @@ -88,6 +88,9 @@ # Default sysroot if no sysroot can be provided. 'sysroot%': '', + # Default clcache mode if no use_clcache_mode can be provided. + 'use_clcache_mode%': 'false', + 'conditions': [ # The system root for linux builds. ['OS=="linux" and use_sysroot==1', { @@ -943,9 +946,13 @@ 'RuntimeTypeInfo': 'false', 'WarningLevel': '3', 'WarnAsError': 'true', - 'DebugInformationFormat': '3', 'Detect64BitPortabilityProblems': 'false', 'conditions': [ + ['use_clcache_mode=="true"', { + 'DebugInformationFormat': '1', + }, { + 'DebugInformationFormat': '3', + }], [ 'msvs_multi_core_compile', { 'AdditionalOptions': ['/MP'], }],