Skip to content

Commit

Permalink
Move to Bazel 0.23.0.
Browse files Browse the repository at this point in the history
This is the last version of Bazel to support the use of the CROSSTOOL file. The
next upgrade migth be a doozy.

It was necessary to bump the version of protobuf in order to get past some
deprecated usage:
bazelbuild/bazel#5827

This further necessitated adding some transitive dependencies. (This is solved
more properly in a later version of protobuf, but moving that far came with a
number of other challenges.) This also required setting
`-Wno-inconsistent-missing-override`; I hope that warning can be restored in
the future.
  • Loading branch information
rpwoodbu committed Feb 27, 2022
1 parent e96fdc3 commit 8dc2c57
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .bazeliskrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
USE_BAZEL_VERSION=0.20.0
USE_BAZEL_VERSION=0.23.0
2 changes: 2 additions & 0 deletions CROSSTOOL
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ toolchain {
compiler_flag: "-Wall"
# All warnings are errors.
compiler_flag: "-Werror"
# Protobufs won't build with this warning:
compiler_flag: "-Wno-inconsistent-missing-override"
# Would be nice to enable this warning, but then protobufs won't build.
#compiler_flag: "-Wunused-parameter"
# But disable some that are problematic.
Expand Down
18 changes: 16 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,19 @@ http_archive(
)

http_archive(
name = "zlib",
name = "pnacl_zlib",
url = "https://gsdview.appspot.com/webports/builds/pepper_49/trunk-785-g807a23e/packages/zlib_1.2.8_pnacl.tar.bz2",
sha256 = "99203f49edad39570a3362e72373ea1d63a97b9b1828b75e45d3e856d2832033",
strip_prefix = "payload",
build_file = "BUILD.zlib",
)

# Needed by `com_google_protobuf`.
bind(
name = "zlib",
actual = "@pnacl_zlib//:zlib",
)

http_archive(
name = "glibc_compat",
url = "https://gsdview.appspot.com/webports/builds/pepper_49/trunk-785-g807a23e/packages/glibc-compat_0.1_pnacl.tar.bz2",
Expand Down Expand Up @@ -105,7 +111,15 @@ new_git_repository(
git_repository(
name = "com_google_protobuf",
remote = "https://github.com/google/protobuf.git",
commit = "ce044817c7ba0aea27c3fd8e496635d94d20a755", # tag = "v3.6.0.1"
commit = "582743bf40c5d3639a70f98f183914a2c0cd0680", # tag = "v3.7.0"
)

# Needed by `com_google_protobuf`.
http_archive(
name = "bazel_skylib",
sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d",
strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b",
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
)

git_repository(
Expand Down
2 changes: 1 addition & 1 deletion external/BUILD.libssh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ cc_library(
":pnacl_mode": [
"@glibc_compat//:glibc_compat",
"@openssl//:openssl",
"@zlib//:zlib",
"@pnacl_zlib//:zlib",
],
"//conditions:default": [
":local_openssl",
Expand Down
2 changes: 1 addition & 1 deletion external/BUILD.mosh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ cc_library(
deps = [
":crypto_lib",
":protos_lib",
"@zlib//:zlib",
"@pnacl_zlib//:zlib",
],
includes = ["src/network"],
)
Expand Down

0 comments on commit 8dc2c57

Please sign in to comment.