diff --git a/bazel/external/v8_include.patch b/bazel/external/v8_include.patch new file mode 100644 index 00000000..0d0fe210 --- /dev/null +++ b/bazel/external/v8_include.patch @@ -0,0 +1,41 @@ +# fix include types for late clang (15.0.7) / gcc (13.2.1) +# for Arch linux / Fedora, like in +# In file included from external/v8/src/torque/torque.cc:5: +# In file included from external/v8/src/torque/source-positions.h:10: +# In file included from external/v8/src/torque/contextual.h:10: +# In file included from external/v8/src/base/macros.h:12: +# external/v8/src/base/logging.h:154:26: error: use of undeclared identifier 'uint16_t' + +diff --git a/src/base/logging.h b/src/base/logging.h +--- a/src/base/logging.h ++++ b/src/base/logging.h +@@ -5,6 +5,7 @@ + #ifndef V8_BASE_LOGGING_H_ + #define V8_BASE_LOGGING_H_ + ++#include + #include + #include + #include +diff --git a/src/base/macros.h b/src/base/macros.h +--- a/src/base/macros.h ++++ b/src/base/macros.h +@@ -5,6 +5,7 @@ + #ifndef V8_BASE_MACROS_H_ + #define V8_BASE_MACROS_H_ + ++#include + #include + #include + +diff --git a/src/inspector/v8-string-conversions.h b/src/inspector/v8-string-conversions.h +--- a/src/inspector/v8-string-conversions.h ++++ b/src/inspector/v8-string-conversions.h +@@ -5,6 +5,7 @@ + #ifndef V8_INSPECTOR_V8_STRING_CONVERSIONS_H_ + #define V8_INSPECTOR_V8_STRING_CONVERSIONS_H_ + ++#include + #include + + // Conversion routines between UT8 and UTF16, used by string-16.{h,cc}. You may diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 57d12a2d..89b0900e 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -130,7 +130,10 @@ def proxy_wasm_cpp_host_repositories(): commit = "6c8b357a84847a479cd329478522feefc1c3195a", remote = "https://chromium.googlesource.com/v8/v8", shallow_since = "1664374400 +0000", - patches = ["@proxy_wasm_cpp_host//bazel/external:v8.patch"], + patches = [ + "@proxy_wasm_cpp_host//bazel/external:v8.patch", + "@proxy_wasm_cpp_host//bazel/external:v8_include.patch", + ], patch_args = ["-p1"], )