Skip to content

Commit 13a04ab

Browse files
jkunkeeCommit Bot
authored andcommitted
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 b0a2a56 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 <[email protected]> Reviewed-by: Jakob Gruber <[email protected]> Commit-Queue: Sigurd Schneider <[email protected]> Cr-Commit-Position: refs/heads/master@{#62660}
1 parent 92e75df commit 13a04ab

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/codegen/arm64/decoder-arm64.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class V8_EXPORT_PRIVATE DecoderVisitor {
9595
};
9696

9797
// A visitor that dispatches to a list of visitors.
98-
class V8_EXPORT_PRIVATE DispatchingDecoderVisitor : public DecoderVisitor {
98+
class DispatchingDecoderVisitor : public DecoderVisitor {
9999
public:
100100
DispatchingDecoderVisitor() {}
101101
virtual ~DispatchingDecoderVisitor() {}
@@ -119,7 +119,7 @@ class V8_EXPORT_PRIVATE DispatchingDecoderVisitor : public DecoderVisitor {
119119
//
120120
// will call in order visitor methods in V3, V2, V1, V4.
121121
void AppendVisitor(DecoderVisitor* visitor);
122-
void PrependVisitor(DecoderVisitor* visitor);
122+
void V8_EXPORT_PRIVATE PrependVisitor(DecoderVisitor* visitor);
123123
void InsertVisitorBefore(DecoderVisitor* new_visitor,
124124
DecoderVisitor* registered_visitor);
125125
void InsertVisitorAfter(DecoderVisitor* new_visitor,

src/codegen/arm64/macro-assembler-arm64.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,7 @@ class InstructionAccurateScope {
19701970
// original state, even if the lists were modified by some other means. Note
19711971
// that this scope can be nested but the destructors need to run in the opposite
19721972
// order as the constructors. We do not have assertions for this.
1973-
class V8_EXPORT_PRIVATE UseScratchRegisterScope {
1973+
class UseScratchRegisterScope {
19741974
public:
19751975
explicit UseScratchRegisterScope(TurboAssembler* tasm)
19761976
: available_(tasm->TmpList()),
@@ -1981,7 +1981,7 @@ class V8_EXPORT_PRIVATE UseScratchRegisterScope {
19811981
DCHECK_EQ(availablefp_->type(), CPURegister::kVRegister);
19821982
}
19831983

1984-
~UseScratchRegisterScope();
1984+
V8_EXPORT_PRIVATE ~UseScratchRegisterScope();
19851985

19861986
// Take a register from the appropriate temps list. It will be returned
19871987
// automatically when the scope ends.
@@ -1998,7 +1998,8 @@ class V8_EXPORT_PRIVATE UseScratchRegisterScope {
19981998
VRegister AcquireSameSizeAs(const VRegister& reg);
19991999

20002000
private:
2001-
static CPURegister AcquireNextAvailable(CPURegList* available);
2001+
V8_EXPORT_PRIVATE static CPURegister AcquireNextAvailable(
2002+
CPURegList* available);
20022003

20032004
// Available scratch registers.
20042005
CPURegList* available_; // kRegister

0 commit comments

Comments
 (0)