Bump Bazel version to 7.0.0
Also update C++-toolchain to use modern C++ features. This is only
relevant for dependencies, that are built from source, like Protobuf and
other transitive dependencies (e.g. abseil-cpp).
We are doing this to synchronize with the Bazel itself, that bumped C++
toolchain in 7.x release line.
The original commit message in this PR: [1]:
In upcoming changes, we'd like to have the ability to use C++17 features.
This ensures that such code will build successfully on the various CI
platforms, regardless of the C++ standard version the compiler defaults
to.
[1] https://github.com/bazelbuild/bazel/pull/20174
Release-Notes: Update Bazel version to 7.0.0
Change-Id: Ie7cb3003da7b9b49100a60c401253eb999dcb6d5
diff --git a/.bazelrc b/.bazelrc
index d0ce34f..fe7d6dc 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -33,6 +33,10 @@
build:remote --tool_java_runtime_version=remotejdk_17
build:remote --config=remote_shared
+# Enable modern C++ features
+build --cxxopt=-std=c++17
+build --host_cxxopt=-std=c++17
+
# Enable strict_action_env flag to. For more information on this feature see
# https://groups.google.com/forum/#!topic/bazel-discuss/_VmRfMyyHBk.
# This will be the new default behavior at some point (and the flag was flipped