Skip to content

Commit

Permalink
Add patch to add "-Wno-stringop-overflow" for upb.
Browse files Browse the repository at this point in the history
#112

PiperOrigin-RevId: 563800951
Change-Id: I487eaeb665497f5bddbfd4d5b16d36e43345b63b
  • Loading branch information
laramiel authored and Copybara-Service committed Sep 8, 2023
1 parent a4e7bcc commit 189610c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions third_party/com_google_protobuf_upb/patches/werror.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff -ruN a/bazel/build_defs.bzl b/bazel/build_defs.bzl
--- a/bazel/build_defs.bzl
+++ b/bazel/build_defs.bzl
@@ -33,6 +33,7 @@
"-Wextra",
# "-Wshorten-64-to-32", # not in GCC (and my Kokoro images doesn't have Clang)
"-Werror",
+ "-Wno-stringop-overflow", # https://github.com/google/tensorstore/issues/112
"-Wno-unused-parameter",
"-Wno-long-long",
])
3 changes: 3 additions & 0 deletions third_party/com_google_protobuf_upb/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def repo():
# descriptor.proto, used for bootstrapping the cmake build, which also breaks
# a big dependency on @com_google_protobuf.
Label("//third_party:com_google_protobuf_upb/patches/bootstrap.diff"),

# Add -Wno-stringop-overread to upb; otherwise gcc fails with error=stringop-overload
Label("//third_party:com_google_protobuf_upb/patches/werror.diff"),
],
patch_args = ["-p1"],
repo_mapping = {
Expand Down

0 comments on commit 189610c

Please sign in to comment.