From 3d119249171ba55797552afd078706d813ac180b 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 Backport-PR-URL: https://github.com/nodejs/node/pull/30109 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 30357657690169..c96c8ef5eb06df 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,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 99ac0d6b1face4..e93d7008e47b96 100644 --- a/deps/v8/src/builtins/setup-builtins-internal.cc +++ b/deps/v8/src/builtins/setup-builtins-internal.cc @@ -276,6 +276,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(); @@ -353,5 +357,10 @@ void SetupIsolateDelegate::SetupBuiltinsInternal(Isolate* isolate) { builtins->MarkInitialized(); } +#ifdef _MSC_VER +#pragma optimize( "", on ) +#endif + + } // namespace internal } // namespace v8