diff --git a/.github/bin/build-and-test.sh b/.github/bin/build-and-test.sh index f24b2a046..8f8c72363 100755 --- a/.github/bin/build-and-test.sh +++ b/.github/bin/build-and-test.sh @@ -78,6 +78,9 @@ if [[ "${CXX}" == clang* ]]; then BAZEL_OPTS="${BAZEL_OPTS} --cxxopt=-Wno-unused-function" # utf8_range dependency fi +# Protobuf triggers a maybe-uninitialized warning. +BAZEL_OPTS="${BAZEL_OPTS} --cxxopt=-Wno-uninitialized" + # If parameter given and the MODE allows choosing, we build the target # as provided, otherwise all. This allows manual invocation of interesting # targets. @@ -111,7 +114,7 @@ case "$MODE" in compile|compile-clang|clean) bazel build --keep_going $BAZEL_OPTS :install-binaries ;; - + compile-static|compile-static-clang) bazel build --keep_going --config=create_static_linked_executables $BAZEL_OPTS :install-binaries ;; diff --git a/.github/settings.sh b/.github/settings.sh index beb0098df..80cb80c99 100644 --- a/.github/settings.sh +++ b/.github/settings.sh @@ -32,7 +32,7 @@ export BAZEL_CXXOPTS="-std=c++17" export BAZEL_OPTS="-c opt --noshow_progress" # Used to fetch the BAZEL version where needed. -export BAZEL_VERSION=4.0.0 +export BAZEL_VERSION=5.4.1 # Kythe version for extracting xRefs export KYTHE_VERSION=v0.0.52 diff --git a/README.md b/README.md index bcaa6dc38..309e96dcd 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ guide and the [development resources](./doc/development.md). Verible's code base is written in C++. -To build, you need the [bazel] (>= 4.0) build system and a C++17 compatible +To build, you need the [bazel] (>= 5.0) build system and a C++17 compatible compiler (e.g. >= g++-10), as well as python3. Use your package manager to install the dependencies; on a system with diff --git a/WORKSPACE b/WORKSPACE index 089199712..4d362a8bf 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -43,11 +43,10 @@ http_archive( patch_args = ["-p1"], patches = [ "//bazel:absl.patch", - "//bazel:fix-uninitialized-var.patch", ], - sha256 = "e46fe4fd52b94dc344429b74b9520bead577f1db622def7a69bdefae6908836c", - strip_prefix = "abseil-cpp-35e8e3f7a2c6972d4c591448e8bbe4f9ed9f815a", - urls = ["https://github.com/abseil/abseil-cpp/archive/35e8e3f7a2c6972d4c591448e8bbe4f9ed9f815a.zip"], + sha256 = "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed", + strip_prefix = "abseil-cpp-20230802.1", + urls = ["https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz"], ) http_archive( @@ -59,9 +58,9 @@ http_archive( http_archive( name = "com_google_googletest", - sha256 = "24564e3b712d3eb30ac9a85d92f7d720f60cc0173730ac166f27dda7fed76cb2", - strip_prefix = "googletest-release-1.12.1", - urls = ["https://github.com/google/googletest/archive/refs/tags/release-1.12.1.zip"], + sha256 = "1f357c27ca988c3f7c6b4bf68a9395005ac6761f034046e9dde0896e3aba00e4", + strip_prefix = "googletest-1.14.0", + urls = ["https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip"], ) http_archive( @@ -140,10 +139,10 @@ bison_register_toolchains() http_archive( name = "com_google_protobuf", - sha256 = "a700a49470d301f1190a487a923b5095bf60f08f4ae4cac9f5f7c36883d17971", - strip_prefix = "protobuf-23.4", + sha256 = "9bd87b8280ef720d3240514f884e56a712f2218f0d693b48050c836028940a42", + strip_prefix = "protobuf-25.1", urls = [ - "https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protobuf-23.4.tar.gz", + "https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protobuf-25.1.tar.gz", ], ) @@ -153,10 +152,10 @@ protobuf_deps() http_archive( name = "rules_proto", - sha256 = "e017528fd1c91c5a33f15493e3a398181a9e821a804eb7ff5acdd1d2d6c2b18d", - strip_prefix = "rules_proto-4.0.0-3.20.0", + sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd", + strip_prefix = "rules_proto-5.3.0-21.7", urls = [ - "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0-3.20.0.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz", ], ) diff --git a/bazel/fix-uninitialized-var.patch b/bazel/fix-uninitialized-var.patch deleted file mode 100644 index 42026d85e..000000000 --- a/bazel/fix-uninitialized-var.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/absl/base/call_once.h b/absl/base/call_once.h -index 96109f53..31d86726 100644 ---- a/absl/base/call_once.h -+++ b/absl/base/call_once.h -@@ -123,6 +123,7 @@ class SchedulingHelper { - - private: - base_internal::SchedulingMode mode_; -+ // NOLINTNEXTLINE(clang-analyzer-optin.cplusplus.UninitializedObject) - bool guard_result_; - }; - diff --git a/shell.nix b/shell.nix index 3e36d3829..955c4a7f5 100644 --- a/shell.nix +++ b/shell.nix @@ -25,7 +25,7 @@ verible_used_stdenv.mkDerivation { name = "verible-build-environment"; buildInputs = with pkgs; [ - bazel_4 + bazel_5 jdk11 git