Skip to content

Commit 63589e5

Browse files
committed
deps: patch V8 to support compilation on win-arm64
1 parent 964ff0c commit 63589e5

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.2',
39+
'v8_embedder_string': '-node.3',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/execution/arm64/simulator-arm64.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
#include "src/trap-handler/trap-handler-simulator.h"
3636
#endif // V8_ENABLE_WEBASSEMBLY
3737

38+
#if defined(_MSC_VER)
39+
// define full memory barrier for msvc
40+
#define __sync_synchronize _ReadWriteBarrier
41+
#endif
42+
3843
namespace v8 {
3944
namespace internal {
4045

deps/v8/src/trap-handler/trap-handler-simulator.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ uintptr_t ProbeMemory(uintptr_t address, uintptr_t pc)
3434
// "ProbeMemory", but we want something more expressive on stack traces.
3535
#if V8_OS_DARWIN
3636
asm("_v8_internal_simulator_ProbeMemory");
37-
#else
37+
#elif !defined(_MSC_VER)
3838
asm("v8_internal_simulator_ProbeMemory");
39+
#else // MSVC
40+
;
3941
#endif
4042

4143
} // namespace v8::internal::trap_handler

0 commit comments

Comments
 (0)