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

[protobuf] Protobuf no longer compiles with vs2019 Update 16.10 w/ c++latest #18251

Merged
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
14 changes: 14 additions & 0 deletions ports/protobuf/port_def.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
index f7b64a080..3493d9082 100644
--- a/src/google/protobuf/port_def.inc
+++ b/src/google/protobuf/port_def.inc
@@ -564,7 +564,8 @@

// Our use of constinit does not yet work with GCC:
// https://github.com/protocolbuffers/protobuf/issues/8310
-#if defined(__cpp_constinit) && !defined(__GNUC__)
+// Does not work yet with Visual Studio 2019 Update 16.10
+#if defined(__cpp_constinit) && !defined(__GNUC__) && !defined(_MSC_VER)
#define PROTOBUF_CONSTINIT constinit
#elif defined(__has_cpp_attribute)
#if __has_cpp_attribute(clang::require_constant_initialization)
1 change: 1 addition & 0 deletions ports/protobuf/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
fix-static-build.patch
fix-default-proto-file-path.patch
port_def.patch
)

string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" protobuf_BUILD_PROTOC_BINARIES)
Expand Down
2 changes: 1 addition & 1 deletion ports/protobuf/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "protobuf",
"version-semver": "3.15.8",
"port-version": 1,
"port-version": 2,
"description": "Protocol Buffers - Google's data interchange format",
"homepage": "https://github.com/protocolbuffers/protobuf",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4954,7 +4954,7 @@
},
"protobuf": {
"baseline": "3.15.8",
"port-version": 1
"port-version": 2
},
"protobuf-c": {
"baseline": "1.3.2-2",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/protobuf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1c52c3eb43c2dfd9603673eb5c173ec69c21ea73",
"version-semver": "3.15.8",
"port-version": 2
},
{
"git-tree": "04dc7ffb4ebb123e734652cdb359ff18dca83ffc",
"version-semver": "3.15.8",
Expand Down