Skip to content

Commit 0c2bb07

Browse files
committed
android-patch: update trap-handler.h.patch
1 parent f0679db commit 0c2bb07

File tree

1 file changed

+34
-13
lines changed

1 file changed

+34
-13
lines changed
Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,47 @@
1-
--- trap-handler.h 2022-08-11 09:01:23.384000000 +0800
2-
+++ fixed-trap-handler.h 2022-08-11 09:09:15.352000000 +0800
3-
@@ -17,23 +17,7 @@
4-
namespace internal {
5-
namespace trap_handler {
6-
1+
--- trap-handler.h
2+
+++ fixed-trap-handler.h
3+
@@ -18,43 +18,1 @@
74
-// X64 on Linux, Windows, MacOS, FreeBSD.
85
-#if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 && \
96
- ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \
107
- V8_OS_FREEBSD)
118
-#define V8_TRAP_HANDLER_SUPPORTED true
12-
-// Arm64 (non-simulator) on Mac.
13-
-#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && V8_OS_DARWIN
9+
-// Arm64 native on Linux, Windows, MacOS.
10+
-#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && \
11+
- ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN)
1412
-#define V8_TRAP_HANDLER_SUPPORTED true
13+
-// For Linux and Mac, enable the simulator when it's been requested.
14+
-#if USE_SIMULATOR && ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_DARWIN)
15+
-#define V8_TRAP_HANDLER_VIA_SIMULATOR
16+
-#endif
1517
-// Arm64 simulator on x64 on Linux, Mac, or Windows.
18+
-//
19+
-// The simulator case uses some inline assembly code, which cannot be
20+
-// compiled with MSVC, so don't enable the trap handler in that case.
21+
-// (MSVC #defines _MSC_VER, but so does Clang when targeting Windows, hence
22+
-// the check for __clang__.)
1623
-#elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_X64 && \
17-
- (V8_OS_LINUX || V8_OS_DARWIN)
24+
- (V8_OS_LINUX || V8_OS_DARWIN || V8_OS_WIN) && \
25+
- (!defined(_MSC_VER) || defined(__clang__))
26+
-#define V8_TRAP_HANDLER_VIA_SIMULATOR
27+
-#define V8_TRAP_HANDLER_SUPPORTED true
28+
-// Loong64 (non-simulator) on Linux.
29+
-#elif V8_TARGET_ARCH_LOONG64 && V8_HOST_ARCH_LOONG64 && V8_OS_LINUX
30+
-#define V8_TRAP_HANDLER_SUPPORTED true
31+
-// Loong64 simulator on x64 on Linux
32+
-#elif V8_TARGET_ARCH_LOONG64 && V8_HOST_ARCH_X64 && V8_OS_LINUX
33+
-#define V8_TRAP_HANDLER_VIA_SIMULATOR
34+
-#define V8_TRAP_HANDLER_SUPPORTED true
35+
-// RISCV64 (non-simulator) on Linux.
36+
-#elif V8_TARGET_ARCH_RISCV64 && V8_HOST_ARCH_RISCV64 && V8_OS_LINUX && \
37+
- !V8_OS_ANDROID
38+
-#define V8_TRAP_HANDLER_SUPPORTED true
39+
-// RISCV64 simulator on x64 on Linux
40+
-#elif V8_TARGET_ARCH_RISCV64 && V8_HOST_ARCH_X64 && V8_OS_LINUX
1841
-#define V8_TRAP_HANDLER_VIA_SIMULATOR
1942
-#define V8_TRAP_HANDLER_SUPPORTED true
2043
-// Everything else is unsupported.
2144
-#else
22-
#define V8_TRAP_HANDLER_SUPPORTED false
45+
-#define V8_TRAP_HANDLER_SUPPORTED false
2346
-#endif
24-
25-
// Setup for shared library export.
26-
#if defined(BUILDING_V8_SHARED) && defined(V8_OS_WIN)
47+
+#define V8_TRAP_HANDLER_SUPPORTED false

0 commit comments

Comments
 (0)