-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump minimum C++ version to C++17 after branch cut for v29.
Branch cut for v29 is done on 2024-09-30: https://github.com/protocolbuffers/protobuf/releases/tag/v29.0-rc1 The next version v30 will be a breaking release. The release date is scheduled after the EOL of C++14 support on 2024-12-15 for Google open source projects generally: https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md This commit allows us to start taking advantage of C++17 features now. Some issues I ran into while upgrading: Two GCC 9.5 bugs related to -Wunused-but-set-parameter: - https://godbolt.org/z/qo51cKe7b - https://godbolt.org/z/65qW3vGhP Another GCC warning related to -Wself-assign in a template. There is a custom ASAN check that is not yet open sourced. I'll see if I can open source them in a subsequent commit. #test-continuous PiperOrigin-RevId: 684540366
- Loading branch information
1 parent
3fe0c75
commit 8420ed1
Showing
10 changed files
with
51 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import common.bazelrc | ||
|
||
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 | ||
build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 | ||
build --cxxopt="-Woverloaded-virtual" | ||
build --copt="-Werror" --copt="-Wno-sign-compare" --copt="-Wno-sign-conversion" --copt="-Wno-error=sign-conversion" --copt="-Wno-deprecated-declarations" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import common.bazelrc | ||
|
||
# Workaround for maximum path length issues | ||
build --cxxopt=/std:c++17 --host_cxxopt=/std:c++17 | ||
startup --output_user_root=C:/tmp --windows_enable_symlinks | ||
common --enable_runfiles | ||
common --enable_runfiles | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import common.bazelrc | ||
|
||
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 | ||
build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 | ||
build --cxxopt="-Woverloaded-virtual" | ||
build --copt="-Werror" --copt="-Wno-sign-compare" --copt="-Wno-sign-conversion" --copt="-Wno-error=sign-conversion" --copt="-Wno-deprecated-declarations" | ||
common --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1 | ||
common --xcode_version_config=@com_google_protobuf//.github:host_xcodes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters