From 796d0ee558467a542648990f2b213a777d6ab6b3 Mon Sep 17 00:00:00 2001 From: Yun Peng Date: Fri, 11 Sep 2020 07:39:36 -0700 Subject: [PATCH] Patch upb to fix build error with gcc 10 Fixes #12056 This is a replacement of https://github.com/bazelbuild/bazel/pull/12077 after an unsuccessful attempt to upgrade upb version. Closes #12083. PiperOrigin-RevId: 331145667 --- WORKSPACE | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index d14a6f2bbb88b3..2e1bb699661d32 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1032,6 +1032,21 @@ register_local_rc_exe_toolchains() register_toolchains("//src/main/res:empty_rc_toolchain") +# Patch upb for grpc due to https://github.com/bazelbuild/bazel/issues/12056 +# TODO: Remove the following after upgrading grpc to a newer version that's not +# affected by this issue. +http_archive( + name = "upb", + sha256 = "61d0417abd60e65ed589c9deee7c124fe76a4106831f6ad39464e1525cef1454", + patches = ["//third_party/grpc:upb_gcc10_fix.patch"], + patch_args = ["-p1"], + strip_prefix = "upb-9effcbcb27f0a665f9f345030188c0b291e32482", + urls = [ + "https://mirror.bazel.build/github.com/protocolbuffers/upb/archive/9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz", + "https://github.com/protocolbuffers/upb/archive/9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz", + ], +) + http_archive( name = "com_github_grpc_grpc", urls = [