Skip to content

Commit

Permalink
deps: patch V8 to support compilation on win-arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed May 16, 2023
1 parent 7bebfcd commit 9603655
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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.2',
'v8_embedder_string': '-node.3',

##### V8 defaults for Node.js #####

Expand Down
5 changes: 5 additions & 0 deletions deps/v8/src/execution/arm64/simulator-arm64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
#include "src/trap-handler/trap-handler-simulator.h"
#endif // V8_ENABLE_WEBASSEMBLY

#if defined(_MSC_VER)
// define full memory barrier for msvc
#define __sync_synchronize _ReadWriteBarrier
#endif

namespace v8 {
namespace internal {

Expand Down
4 changes: 3 additions & 1 deletion deps/v8/src/trap-handler/trap-handler-simulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ uintptr_t ProbeMemory(uintptr_t address, uintptr_t pc)
// "ProbeMemory", but we want something more expressive on stack traces.
#if V8_OS_DARWIN
asm("_v8_internal_simulator_ProbeMemory");
#else
#elif !defined(_MSC_VER)
asm("v8_internal_simulator_ProbeMemory");
#else // MSVC
;
#endif

} // namespace v8::internal::trap_handler
Expand Down

0 comments on commit 9603655

Please sign in to comment.