--- cargo-crates/v8-146.4.0/v8/BUILD.gn.orig 2006-07-24 01:21:28 UTC +++ cargo-crates/v8-146.4.0/v8/BUILD.gn @@ -1012,6 +1012,8 @@ external_v8_defines = [ "V8_TARGET_OS_MACOS", "V8_TARGET_OS_WIN", "V8_TARGET_OS_CHROMEOS", + "V8_TARGET_OS_FREEBSD", + "V8_TARGET_OS_BSD", "V8_TARGET_ARCH_ARM64", "V8_TARGET_ARCH_PPC64", ] @@ -1094,6 +1096,10 @@ 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" ] + enabled_external_v8_defines += [ "V8_TARGET_OS_BSD" ] } # Some V8_TARGET_ARCH_ defines that affect Api constants (see usages of @@ -7130,7 +7136,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", @@ -7141,6 +7147,12 @@ v8_component("v8_libbase") { "dl", "rt", ] + } 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",