From fb635f615b10b7d793c93bd9fb66910af190ffcd Mon Sep 17 00:00:00 2001 From: Stefan Budeanu Date: Tue, 19 Jul 2016 21:03:33 -0400 Subject: [PATCH] deps: cherry-pick 6f68f30 from v8 upstream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: [build] Add force_dynamic_crt option to build a static library with /… …MD on windows Adds option to build a V8 library statically, but with the options on windows that allows it to be subsequently included in another DLL. On Windows this is required for it to correclty link against the correct C++ runtime. Require for our Node.js shared library build. Reference: nodejs/node#7487 BUG= R=machenbach@chromium.org, michael_dawson@ca.ibm.com Committed: https://crrev.com/9cf88c1c364cf76c1e745aa63196768435e8ef5d Review-Url: https://codereview.chromium.org/2149963002 Cr-Original-Commit-Position: refs/heads/master@{#37814} Cr-Commit-Position: refs/heads/master@{#37856} Ref: https://github.com/nodejs/node/pull/7802 Ref: https://github.com/nodejs/node/pull/8084 Reviewed-By: Ben Noordhuis Reviewed-By: Michael Dawson --- deps/v8/build/standalone.gypi | 1 + deps/v8/build/toolchain.gypi | 6 +++--- deps/v8/include/v8-version.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/deps/v8/build/standalone.gypi b/deps/v8/build/standalone.gypi index 6c88409dbee892..a9123cbae0343c 100644 --- a/deps/v8/build/standalone.gypi +++ b/deps/v8/build/standalone.gypi @@ -33,6 +33,7 @@ 'includes': ['toolchain.gypi'], 'variables': { 'component%': 'static_library', + 'force_dynamic_crt%': 0, 'clang_xcode%': 0, # Track where uninitialized memory originates from. From fastest to # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2 diff --git a/deps/v8/build/toolchain.gypi b/deps/v8/build/toolchain.gypi index 6090898073082d..faecf8e43d5168 100644 --- a/deps/v8/build/toolchain.gypi +++ b/deps/v8/build/toolchain.gypi @@ -1104,7 +1104,7 @@ 'VCCLCompilerTool': { 'Optimization': '0', 'conditions': [ - ['component=="shared_library"', { + ['component=="shared_library" or force_dynamic_crt==1', { 'RuntimeLibrary': '3', # /MDd }, { 'RuntimeLibrary': '1', # /MTd @@ -1156,7 +1156,7 @@ 'StringPooling': 'true', 'BasicRuntimeChecks': '0', 'conditions': [ - ['component=="shared_library"', { + ['component=="shared_library" or force_dynamic_crt==1', { 'RuntimeLibrary': '3', #/MDd }, { 'RuntimeLibrary': '1', #/MTd @@ -1347,7 +1347,7 @@ 'FavorSizeOrSpeed': '0', 'StringPooling': 'true', 'conditions': [ - ['component=="shared_library"', { + ['component=="shared_library" or force_dynamic_crt==1', { 'RuntimeLibrary': '2', #/MD }, { 'RuntimeLibrary': '0', #/MT diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index 32ead433947211..4723fe3b9d4a98 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 5 #define V8_MINOR_VERSION 1 #define V8_BUILD_NUMBER 281 -#define V8_PATCH_LEVEL 87 +#define V8_PATCH_LEVEL 88 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.)