2023-08-16 22:26:55 +00:00
|
|
|
Index: v8/BUILD.gn
|
|
|
|
--- v8/BUILD.gn.orig
|
|
|
|
+++ v8/BUILD.gn
|
2023-09-14 00:49:35 +00:00
|
|
|
@@ -1404,6 +1404,14 @@ config("toolchain") {
|
2023-08-16 22:26:55 +00:00
|
|
|
} else if (target_os == "chromeos") {
|
|
|
|
defines += [ "V8_HAVE_TARGET_OS" ]
|
|
|
|
defines += [ "V8_TARGET_OS_CHROMEOS" ]
|
|
|
|
+ } else if (target_os == "openbsd") {
|
|
|
|
+ defines += [ "V8_HAVE_TARGET_OS" ]
|
|
|
|
+ defines += [ "V8_TARGET_OS_OPENBSD" ]
|
|
|
|
+ defines += [ "V8_TARGET_OS_BSD" ]
|
|
|
|
+ } else if (target_os == "freebsd") {
|
|
|
|
+ defines += [ "V8_HAVE_TARGET_OS" ]
|
|
|
|
+ defines += [ "V8_TARGET_OS_FREEBSD" ]
|
|
|
|
+ defines += [ "V8_TARGET_OS_BSD" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
# TODO(infra): Support v8_enable_prof on Windows.
|
2023-09-14 00:49:35 +00:00
|
|
|
@@ -2331,6 +2339,11 @@ template("run_mksnapshot") {
|
|
|
|
"--turbo-log-builtins-count-input",
|
|
|
|
v8_log_builtins_block_count_input,
|
2023-08-16 22:26:55 +00:00
|
|
|
]
|
|
|
|
+ if (v8_current_cpu == "x86") {
|
|
|
|
+ args -= [
|
|
|
|
+ "--abort-on-bad-builtin-profile-data",
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
2023-09-14 00:49:35 +00:00
|
|
|
if (v8_enable_builtins_profiling) {
|
2023-09-17 04:05:06 +00:00
|
|
|
@@ -2353,6 +2366,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",
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
|
|
|
# This is needed to distinguish between generating code for the simulator
|
|
|
|
@@ -6081,7 +6100,7 @@ v8_component("v8_libbase") {
|
2023-08-16 22:26:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- 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",
|
2023-09-17 04:05:06 +00:00
|
|
|
@@ -6092,6 +6111,18 @@ v8_component("v8_libbase") {
|
2023-08-16 22:26:55 +00:00
|
|
|
"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",
|