From f24caeff2ff6ee0ed81c9a7a8f0cd8fcd8637c37 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/28955 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 c96c8ef5eb06df..074a6cdf8f6c19 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.7', + 'v8_embedder_string': '-node.8', ##### 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 7b4a068300e20f..e3403c601d6c0c 100644 --- a/deps/v8/src/builtins/setup-builtins-internal.cc +++ b/deps/v8/src/builtins/setup-builtins-internal.cc @@ -282,6 +282,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(); @@ -359,5 +363,10 @@ void SetupIsolateDelegate::SetupBuiltinsInternal(Isolate* isolate) { builtins->MarkInitialized(); } +#ifdef _MSC_VER +#pragma optimize( "", on ) +#endif + + } // namespace internal } // namespace v8