opnsense-ports/devel/electron22/files/patch-v8_BUILD.gn
Franco Fichtner 783c070081 */*: sync with upstream
Taken from: FreeBSD
2023-01-31 17:15:10 +01:00

45 lines
1.4 KiB
Text

--- v8/BUILD.gn.orig 2023-01-30 07:58:59 UTC
+++ v8/BUILD.gn
@@ -1246,6 +1246,14 @@ config("toolchain") {
} else if (target_os == "win") {
defines += [ "V8_HAVE_TARGET_OS" ]
defines += [ "V8_TARGET_OS_WIN" ]
+ } 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.
@@ -5485,7 +5493,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",
@@ -5496,6 +5504,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",