-
Notifications
You must be signed in to change notification settings - Fork 762
/
Copy pathpatch-v8_BUILD.gn
65 lines (61 loc) · 1.98 KB
/
patch-v8_BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--- v8/BUILD.gn.orig 2025-01-15 09:18:26 UTC
+++ v8/BUILD.gn
@@ -929,6 +929,8 @@ external_v8_defines = [
"V8_TARGET_OS_MACOS",
"V8_TARGET_OS_WIN",
"V8_TARGET_OS_CHROMEOS",
+ "V8_TARGET_OS_OPENBSD",
+ "V8_TARGET_OS_FREEBSD",
]
enabled_external_v8_defines = [
@@ -1005,6 +1007,12 @@ if (target_os == "android") {
} else if (target_os == "chromeos") {
enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ]
enabled_external_v8_defines += [ "V8_TARGET_OS_CHROMEOS" ]
+} else if (target_os == "openbsd") {
+ enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ]
+ enabled_external_v8_defines += [ "V8_TARGET_OS_OPENBSD" ]
+} else if (target_os == "freebsd") {
+ enabled_external_v8_defines += [ "V8_HAVE_TARGET_OS" ]
+ enabled_external_v8_defines += [ "V8_TARGET_OS_FREEBSD" ]
}
disabled_external_v8_defines = external_v8_defines - enabled_external_v8_defines
@@ -2572,6 +2580,12 @@ template("run_mksnapshot") {
if (!v8_enable_builtins_profiling && v8_enable_builtins_reordering) {
args += [ "--reorder-builtins" ]
}
+
+ if (v8_current_cpu == "x86") {
+ args -= [
+ "--abort-on-bad-builtin-profile-data",
+ ]
+ }
}
if (v8_enable_turboshaft_csa) {
@@ -6645,7 +6659,7 @@ v8_component("v8_libbase") {
}
}
- if (is_linux || is_chromeos) {
+ if ((is_linux || is_chromeos) && !is_bsd) {
sources += [
"src/base/debug/stack_trace_posix.cc",
"src/base/platform/platform-linux.cc",
@@ -6656,6 +6670,18 @@ v8_component("v8_libbase") {
"dl",
"rt",
]
+ } else if (is_openbsd) {
+ sources += [
+ "src/base/debug/stack_trace_posix.cc",
+ "src/base/platform/platform-openbsd.cc",
+ ]
+ libs = [ "execinfo" ]
+ } else if (is_freebsd) {
+ sources += [
+ "src/base/debug/stack_trace_posix.cc",
+ "src/base/platform/platform-freebsd.cc",
+ ]
+ libs = [ "execinfo" ]
} else if (current_os == "aix") {
sources += [
"src/base/debug/stack_trace_posix.cc",