Skip to content

Commit 44f1bbe

Browse files
committed
disable V8_TRAP_HANDLER_SUPPORTED for all platforms, since there's a bug when cross-compilation
1 parent 1cf29ee commit 44f1bbe

1 file changed

Lines changed: 44 additions & 42 deletions

File tree

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

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -15,49 +15,51 @@
1515

1616
namespace v8::internal::trap_handler {
1717

18-
// X64 on Linux, Windows, MacOS, FreeBSD.
19-
#if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 && \
20-
((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \
21-
V8_OS_FREEBSD)
22-
#define V8_TRAP_HANDLER_SUPPORTED true
23-
// Arm64 native on Linux, Windows, MacOS.
24-
#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && \
25-
((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN)
26-
#define V8_TRAP_HANDLER_SUPPORTED true
27-
// For Linux and Mac, enable the simulator when it's been requested.
28-
#if USE_SIMULATOR && ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_DARWIN)
29-
#define V8_TRAP_HANDLER_VIA_SIMULATOR
30-
#endif
31-
// Arm64 simulator on x64 on Linux, Mac, or Windows.
32-
//
33-
// The simulator case uses some inline assembly code, which cannot be
34-
// compiled with MSVC, so don't enable the trap handler in that case.
35-
// (MSVC #defines _MSC_VER, but so does Clang when targeting Windows, hence
36-
// the check for __clang__.)
37-
#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_X64 && \
38-
(V8_OS_LINUX || V8_OS_DARWIN || V8_OS_WIN) && \
39-
(!defined(_MSC_VER) || defined(__clang__))
40-
#define V8_TRAP_HANDLER_VIA_SIMULATOR
41-
#define V8_TRAP_HANDLER_SUPPORTED true
42-
// Loong64 (non-simulator) on Linux.
43-
#elif V8_TARGET_ARCH_LOONG64 && V8_HOST_ARCH_LOONG64 && V8_OS_LINUX
44-
#define V8_TRAP_HANDLER_SUPPORTED true
45-
// Loong64 simulator on x64 on Linux
46-
#elif V8_TARGET_ARCH_LOONG64 && V8_HOST_ARCH_X64 && V8_OS_LINUX
47-
#define V8_TRAP_HANDLER_VIA_SIMULATOR
48-
#define V8_TRAP_HANDLER_SUPPORTED true
49-
// RISCV64 (non-simulator) on Linux.
50-
#elif V8_TARGET_ARCH_RISCV64 && V8_HOST_ARCH_RISCV64 && V8_OS_LINUX && \
51-
!V8_OS_ANDROID
52-
#define V8_TRAP_HANDLER_SUPPORTED true
53-
// RISCV64 simulator on x64 on Linux
54-
#elif V8_TARGET_ARCH_RISCV64 && V8_HOST_ARCH_X64 && V8_OS_LINUX
55-
#define V8_TRAP_HANDLER_VIA_SIMULATOR
56-
#define V8_TRAP_HANDLER_SUPPORTED true
57-
// Everything else is unsupported.
58-
#else
18+
// // X64 on Linux, Windows, MacOS, FreeBSD.
19+
// #if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 && \
20+
// ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \
21+
// V8_OS_FREEBSD)
22+
// #define V8_TRAP_HANDLER_SUPPORTED true
23+
// // Arm64 native on Linux, Windows, MacOS.
24+
// #elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && \
25+
// ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN)
26+
// #define V8_TRAP_HANDLER_SUPPORTED true
27+
// // For Linux and Mac, enable the simulator when it's been requested.
28+
// #if USE_SIMULATOR && ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_DARWIN)
29+
// #define V8_TRAP_HANDLER_VIA_SIMULATOR
30+
// #endif
31+
// // Arm64 simulator on x64 on Linux, Mac, or Windows.
32+
// //
33+
// // The simulator case uses some inline assembly code, which cannot be
34+
// // compiled with MSVC, so don't enable the trap handler in that case.
35+
// // (MSVC #defines _MSC_VER, but so does Clang when targeting Windows, hence
36+
// // the check for __clang__.)
37+
// #elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_X64 && \
38+
// (V8_OS_LINUX || V8_OS_DARWIN || V8_OS_WIN) && \
39+
// (!defined(_MSC_VER) || defined(__clang__))
40+
// #define V8_TRAP_HANDLER_VIA_SIMULATOR
41+
// #define V8_TRAP_HANDLER_SUPPORTED true
42+
// // Loong64 (non-simulator) on Linux.
43+
// #elif V8_TARGET_ARCH_LOONG64 && V8_HOST_ARCH_LOONG64 && V8_OS_LINUX
44+
// #define V8_TRAP_HANDLER_SUPPORTED true
45+
// // Loong64 simulator on x64 on Linux
46+
// #elif V8_TARGET_ARCH_LOONG64 && V8_HOST_ARCH_X64 && V8_OS_LINUX
47+
// #define V8_TRAP_HANDLER_VIA_SIMULATOR
48+
// #define V8_TRAP_HANDLER_SUPPORTED true
49+
// // RISCV64 (non-simulator) on Linux.
50+
// #elif V8_TARGET_ARCH_RISCV64 && V8_HOST_ARCH_RISCV64 && V8_OS_LINUX && \
51+
// !V8_OS_ANDROID
52+
// #define V8_TRAP_HANDLER_SUPPORTED true
53+
// // RISCV64 simulator on x64 on Linux
54+
// #elif V8_TARGET_ARCH_RISCV64 && V8_HOST_ARCH_X64 && V8_OS_LINUX
55+
// #define V8_TRAP_HANDLER_VIA_SIMULATOR
56+
// #define V8_TRAP_HANDLER_SUPPORTED true
57+
// // Everything else is unsupported.
58+
// #else
59+
// #define V8_TRAP_HANDLER_SUPPORTED false
60+
// #endif
61+
5962
#define V8_TRAP_HANDLER_SUPPORTED false
60-
#endif
6163

6264
#if V8_OS_ANDROID && V8_TRAP_HANDLER_SUPPORTED
6365
// It would require some careful security review before the trap handler

0 commit comments

Comments
 (0)