Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.4.0] Fix upb build with Clang 16 #23700

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ bazel_dep(name = "c-ares", version = "1.15.0")
bazel_dep(name = "rules_go", version = "0.39.1")
bazel_dep(name = "rules_kotlin", version = "1.9.0")
bazel_dep(name = "upb", version = "0.0.0-20220923-a547704")
single_version_override(
module_name = "upb",
patch_strip = 1,
patches = [
"//third_party/upb:01_remove_werror.patch",
],
)

# =========================================
# Java dependencies
Expand Down
1 change: 1 addition & 0 deletions third_party/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ filegroup(
"//third_party/py/mock:srcs",
"//third_party/py/six:srcs",
"//third_party/remoteapis:srcs",
"//third_party/upb:srcs",
"//third_party/zlib:srcs",
],
)
Expand Down
19 changes: 19 additions & 0 deletions third_party/upb/01_remove_werror.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl
--- a/bazel/build_defs.bzl
+++ b/bazel/build_defs.bzl
@@ -34,13 +34,13 @@
_DEFAULT_CPPOPTS.extend([
"-Wextra",
# "-Wshorten-64-to-32", # not in GCC (and my Kokoro images doesn't have Clang)
- "-Werror",
+ # "-Werror",
"-Wno-long-long",
])
_DEFAULT_COPTS.extend([
"-std=c99",
"-pedantic",
- "-Werror=pedantic",
+ # "-Werror=pedantic",
"-Wall",
"-Wstrict-prototypes",
# GCC (at least) emits spurious warnings for this that cannot be fixed
11 changes: 11 additions & 0 deletions third_party/upb/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
licenses(["notice"])

filegroup(
name = "srcs",
srcs = glob(["**"]), # glob everything to satisfy the compile.sh srcs test
visibility = ["//third_party:__pkg__"],
)

exports_files([
"01_remove_werror.patch",
])
Loading