diff --git a/WORKSPACE b/WORKSPACE index 2d995f095e..55fddef663 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1232,7 +1232,7 @@ register_toolchains("//src/main/res:empty_rc_toolchain") http_archive( name = "com_github_grpc_grpc", patch_args = ["-p1"], - patches = ["//third_party/grpc:grpc_1.33.1.patch"], + patches = ["//third_party/grpc:grpc_1.33.1.patch", "//:grpc-upb-clang16.patch"], sha256 = "58eaee5c0f1bd0b92ebe1fa0606ec8f14798500620e7444726afcaf65041cb63", strip_prefix = "grpc-1.33.1", urls = [ diff --git a/grpc-upb-clang16.patch b/grpc-upb-clang16.patch new file mode 100644 index 0000000000..ae6a7ad0e0 --- /dev/null +++ b/grpc-upb-clang16.patch @@ -0,0 +1,13 @@ +diff -r -u a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl +--- a/bazel/grpc_deps.bzl ++++ b/bazel/grpc_deps.bzl +@@ -285,6 +285,8 @@ + name = "upb", + sha256 = "7992217989f3156f8109931c1fc6db3434b7414957cb82371552377beaeb9d6c", + strip_prefix = "upb-382d5afc60e05470c23e8de19b19fc5ad231e732", ++ patches = ["//:upb-clang16.patch"], ++ patch_args = ["-p1"], + urls = [ + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/382d5afc60e05470c23e8de19b19fc5ad231e732.tar.gz", + "https://github.com/protocolbuffers/upb/archive/382d5afc60e05470c23e8de19b19fc5ad231e732.tar.gz", + diff --git a/upb-clang16.patch b/upb-clang16.patch new file mode 100644 index 0000000000..b799737fac --- /dev/null +++ b/upb-clang16.patch @@ -0,0 +1,18 @@ +--- a/BUILD ++++ b/BUILD +@@ -34,6 +34,7 @@ + "-Wextra", + # "-Wshorten-64-to-32", # not in GCC (and my Kokoro images doesn't have Clang) + "-Werror", ++ "-Wno-gnu-offsetof-extensions", + "-Wno-long-long", + # copybara:strip_end + ] +@@ -42,6 +43,7 @@ + # copybara:strip_for_google3_begin + "-pedantic", + "-Werror=pedantic", ++ "-Wno-gnu-offsetof-extensions", + "-Wstrict-prototypes", + # copybara:strip_end + ]