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

* Create port_def.patch

Patch to turn off constinit with Visual Studio 2019 Update 16.10

* Update portfile.cmake

Apply port_def.patch

* Update vcpkg.json

Increment port-version

* Add version
This commit is contained in:
Max Golovanov 2021-06-10 16:32:11 -07:00 committed by GitHub
parent 761578f827
commit 7d472dd258
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 2 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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": [

View File

@ -4974,7 +4974,7 @@
},
"protobuf": {
"baseline": "3.15.8",
"port-version": 1
"port-version": 2
},
"protobuf-c": {
"baseline": "1.3.2-2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "1c52c3eb43c2dfd9603673eb5c173ec69c21ea73",
"version-semver": "3.15.8",
"port-version": 2
},
{
"git-tree": "04dc7ffb4ebb123e734652cdb359ff18dca83ffc",
"version-semver": "3.15.8",