2023-08-16 22:26:55 +00:00
|
|
|
Hunk 1: enable webassembly on OpenBSD
|
|
|
|
|
|
|
|
Hunk 2: don't link against libatomic with clang, which uses libcompiler-rt
|
|
|
|
at least on OpenBSD. The heuristic used is that llvm_version will be different
|
|
|
|
from "0.0" if llvm (clang) is detected.
|
|
|
|
|
|
|
|
Index: tools/v8_gypfiles/v8.gyp
|
|
|
|
--- tools/v8_gypfiles/v8.gyp.orig
|
|
|
|
+++ tools/v8_gypfiles/v8.gyp
|
|
|
|
@@ -372,6 +372,9 @@
|
|
|
|
'v8_libplatform',
|
|
|
|
]
|
|
|
|
}],
|
|
|
|
+ ['v8_control_flow_integrity==1', {
|
|
|
|
+ 'sources': [ '<(V8_ROOT)/src/deoptimizer/deoptimizer-cfi-builtins.cc' ],
|
|
|
|
+ }],
|
|
|
|
],
|
|
|
|
'sources': [
|
|
|
|
'<(V8_ROOT)/src/init/setup-isolate-deserialize.cc',
|
|
|
|
@@ -581,7 +584,7 @@
|
|
|
|
}],
|
|
|
|
['v8_enable_webassembly==1', {
|
|
|
|
'conditions': [
|
|
|
|
- ['OS=="linux" or OS=="mac" or OS=="ios" or OS=="freebsd"', {
|
|
|
|
+ ['OS=="linux" or OS=="mac" or OS=="ios" or OS=="freebsd" or OS=="openbsd"', {
|
|
|
|
'sources': [
|
|
|
|
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_linux.*?sources \\+= ")',
|
|
|
|
],
|
|
|
|
@@ -821,7 +824,7 @@
|
|
|
|
}],
|
|
|
|
['v8_enable_webassembly==1', {
|
|
|
|
'conditions': [
|
|
|
|
- ['OS=="linux" or OS=="mac" or OS=="ios" or OS=="freebsd"', {
|
|
|
|
+ ['OS=="linux" or OS=="mac" or OS=="ios" or OS=="freebsd" or OS=="openbsd"', {
|
|
|
|
'sources': [
|
|
|
|
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_linux.*?sources \\+= ")',
|
|
|
|
],
|
|
|
|
@@ -977,7 +980,7 @@
|
|
|
|
}],
|
|
|
|
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
|
|
|
|
# to implement atomic memory access
|
|
|
|
- ['v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc", "arm", "riscv64", "loong64"]', {
|
|
|
|
+ ['v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc", "arm", "riscv64", "loong64"] and llvm_version == "0.0"', {
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': ['-latomic', ],
|
|
|
|
},
|
2023-08-18 18:38:43 +00:00
|
|
|
@@ -1438,6 +1441,9 @@
|
2023-08-16 22:26:55 +00:00
|
|
|
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"mksnapshot.*?sources = ")',
|
|
|
|
],
|
|
|
|
'conditions': [
|
|
|
|
+ ['v8_control_flow_integrity==1', {
|
|
|
|
+ 'sources': [ '<(V8_ROOT)/src/deoptimizer/deoptimizer-cfi-empty.cc' ],
|
|
|
|
+ }],
|
|
|
|
['want_separate_host_toolset', {
|
|
|
|
'toolsets': ['host'],
|
|
|
|
}],
|