From 3cf688883591eb31e1293b07d711279b3d1d9d43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= <targos@protonmail.com>
Date: Tue, 5 Mar 2024 13:45:32 +0100
Subject: [PATCH] tools: update V8 gypfiles for 12.4

Refs: https://github.com/v8/v8/commit/6196de89e304b22a007397fcd7424d29d18dbd09
Refs: https://github.com/v8/v8/commit/4af6461ae38db31c6fe4b356d19d0ceb452efdbc
Refs: https://github.com/v8/v8/commit/7ba16eadb311ceb6f62c437ef25a79d47e8b4623
---
 tools/v8_gypfiles/v8.gyp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
index e6ee46336c58a0..1e2b3645132aab 100644
--- a/tools/v8_gypfiles/v8.gyp
+++ b/tools/v8_gypfiles/v8.gyp
@@ -558,6 +558,7 @@
       'direct_dependent_settings': {
         'sources': [
           '<(V8_ROOT)/src/flags/flag-definitions.h',
+          '<(V8_ROOT)/src/flags/flags-impl.h',
           '<(V8_ROOT)/src/flags/flags.h',
         ],
       },
@@ -577,6 +578,7 @@
         'run_torque',
         'v8_abseil',
         'v8_libbase',
+        'fp16',
       ],
       'direct_dependent_settings': {
         'sources': [
@@ -986,6 +988,7 @@
         'v8_zlib',
         'v8_pch',
         'v8_abseil',
+        'fp16',
       ],
       'includes': ['inspector.gypi'],
       'direct_dependent_settings': {
@@ -1037,6 +1040,7 @@
         ['v8_enable_webassembly==1', {
           'sources': [
             '<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn"  "\\"v8_base_without_compiler.*?v8_enable_webassembly.*?sources \\+= ")',
+            '<(V8_ROOT)/src/wasm/fuzzing/random-module-generation.cc',
           ],
         }],
         ['v8_enable_third_party_heap==1', {
@@ -2488,5 +2492,18 @@
         '<(ABSEIL_ROOT)/absl/utility/utility.h',
       ]
     },  # v8_abseil
+    {
+      'target_name': 'fp16',
+      'type': 'none',
+      'toolsets': ['host', 'target'],
+      'variables': {
+        'FP16_ROOT': '../../deps/v8/third_party/fp16',
+      },
+      'direct_dependent_settings': {
+        'include_dirs': [
+          '<(FP16_ROOT)/src/include',
+        ],
+      },
+    },  # fp16
   ],
 }