--- v8/BUILD.gn.orig 2026-04-04 05:40:58 UTC +++ v8/BUILD.gn @@ -1014,6 +1014,8 @@ external_v8_defines = [ "V8_TARGET_OS_CHROMEOS", "V8_TARGET_ARCH_ARM64", "V8_TARGET_ARCH_PPC64", + "V8_TARGET_OS_OPENBSD", + "V8_TARGET_OS_FREEBSD", ] enabled_external_v8_defines = [ @@ -1094,6 +1096,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" ] } # Some V8_TARGET_ARCH_ defines that affect Api constants (see usages of @@ -1844,7 +1852,6 @@ config("strict_warnings") { } cflags += [ "-Wmissing-field-initializers", - "-Wunnecessary-virtual-specifier", ] } } @@ -2774,6 +2781,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 @@ -7132,7 +7145,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", @@ -7143,6 +7156,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",