mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-11 16:39:01 +08:00
7d472dd258
* 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
15 lines
652 B
Diff
15 lines
652 B
Diff
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)
|