From 21745b50d54e8944fae9120e8e7911e04c40b65c Mon Sep 17 00:00:00 2001 From: Jon Kunkee Date: Wed, 3 Jul 2019 17:57:08 -0700 Subject: [PATCH] deps: cherry-pick 13a04aba from V8 upstream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: fix: move V8_EXPORT_PRIVATE marks to prevent unresolvable references This change fixes missing symbol errors in the Windows 10 on ARM build of Node.js. When a whole class is marked for export, all of its members are marked as well. This can be a problem when inline members call undefined yet inline members of other classes: the exported function will contain a reference to the undefined inline function that should be satisfied at link time, but because the other function is inline no symbol will be produced that will satisfy that reference. Clang gets around this by masking inlined class members from export using /Fc:dllexportInlines-. This is why b0a2a567 worked. Node.js' Windows builds use MSVC and so do not have access to this flag. This results in unresolved symbols at link time. Bug: v8:9465 Change-Id: Ief9c7ab6ba35d22f995939eb62a64d6f1992ed85 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1696771 Reviewed-by: Sigurd Schneider Reviewed-by: Jakob Gruber Commit-Queue: Sigurd Schneider Cr-Commit-Position: refs/heads/master@{#62660} Refs: https://github.com/v8/v8/commit/13a04abacd6a15b0b06c9ad08e237af703a57dec PR-URL: https://github.com/nodejs/node/pull/28602 Reviewed-By: João Reis Reviewed-By: Ben Noordhuis Reviewed-By: Richard Lau --- common.gypi | 2 +- deps/v8/src/codegen/arm64/decoder-arm64.h | 2 +- deps/v8/src/codegen/arm64/macro-assembler-arm64.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common.gypi b/common.gypi index 5ea3e365064ffd..ca1f853172063a 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.11', + 'v8_embedder_string': '-node.12', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/codegen/arm64/decoder-arm64.h b/deps/v8/src/codegen/arm64/decoder-arm64.h index 7621c516ce79bd..3d113eb8366b5e 100644 --- a/deps/v8/src/codegen/arm64/decoder-arm64.h +++ b/deps/v8/src/codegen/arm64/decoder-arm64.h @@ -95,7 +95,7 @@ class V8_EXPORT_PRIVATE DecoderVisitor { }; // A visitor that dispatches to a list of visitors. -class V8_EXPORT_PRIVATE DispatchingDecoderVisitor : public DecoderVisitor { +class DispatchingDecoderVisitor : public DecoderVisitor { public: DispatchingDecoderVisitor() {} virtual ~DispatchingDecoderVisitor() {} diff --git a/deps/v8/src/codegen/arm64/macro-assembler-arm64.h b/deps/v8/src/codegen/arm64/macro-assembler-arm64.h index 6961428f35a0c0..f217c3c586afa7 100644 --- a/deps/v8/src/codegen/arm64/macro-assembler-arm64.h +++ b/deps/v8/src/codegen/arm64/macro-assembler-arm64.h @@ -1968,7 +1968,7 @@ class InstructionAccurateScope { // original state, even if the lists were modified by some other means. Note // that this scope can be nested but the destructors need to run in the opposite // order as the constructors. We do not have assertions for this. -class V8_EXPORT_PRIVATE UseScratchRegisterScope { +class UseScratchRegisterScope { public: explicit UseScratchRegisterScope(TurboAssembler* tasm) : available_(tasm->TmpList()),