From 253053ec4e570049bcb0acaccab5473b4461613a Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Fri, 17 May 2019 11:50:21 -0400 Subject: [PATCH] deps: V8: add workaround for MSVC optimizer bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://developercommunity.visualstudio.com/content/problem/512352/compiler-doesnt-finish-142027508.html PR-URL: https://github.com/nodejs/node/pull/28016 Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann (רפאל פלחי) Reviewed-By: Rich Trott Reviewed-By: Michael Dawson Reviewed-By: Jiawen Geng --- common.gypi | 2 +- deps/v8/src/builtins/setup-builtins-internal.cc | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/common.gypi b/common.gypi index 9a8849fb7cf9dc..03095e187d87e6 100644 --- a/common.gypi +++ b/common.gypi @@ -39,7 +39,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.6', + 'v8_embedder_string': '-node.7', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/builtins/setup-builtins-internal.cc b/deps/v8/src/builtins/setup-builtins-internal.cc index e3f39a0906a350..e0d91feb7fac7a 100644 --- a/deps/v8/src/builtins/setup-builtins-internal.cc +++ b/deps/v8/src/builtins/setup-builtins-internal.cc @@ -275,6 +275,10 @@ Code GenerateBytecodeHandler(Isolate* isolate, int builtin_index, } // namespace +#ifdef _MSC_VER +#pragma optimize( "", off ) +#endif + // static void SetupIsolateDelegate::SetupBuiltinsInternal(Isolate* isolate) { Builtins* builtins = isolate->builtins(); @@ -351,5 +355,10 @@ void SetupIsolateDelegate::SetupBuiltinsInternal(Isolate* isolate) { builtins->MarkInitialized(); } +#ifdef _MSC_VER +#pragma optimize( "", on ) +#endif + + } // namespace internal } // namespace v8