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
@@ -373,6 +373,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',
@@ -605,7 +608,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_enable_i18n_support.*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_linux.*?sources \\+= ")',
                     ],
@@ -940,7 +943,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_enable_wasm_gdb_remote_debugging.*?v8_current_cpu == \\"x64\\".*?v8_enable_webassembly.*?is_linux.*?sources \\+= ")',
                   ],
@@ -1095,7 +1098,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 ["mips64", "mips64el", "ppc", "arm", "riscv64", "loong64"]', {
+        ['v8_current_cpu in ["mips64", "mips64el", "ppc", "arm", "riscv64", "loong64"] and llvm_version == "0.0"', {
           'link_settings': {
             'libraries': ['-latomic', ],
           },
@@ -1558,6 +1561,9 @@
         '<!@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'],
         }],
