[folly] Update to version v2017.10.02.00

This commit is contained in:
Arkady Shapkin 2017-10-13 17:19:31 +03:00
parent 7ed8d4f75e
commit 9153ac76be
5 changed files with 61 additions and 3 deletions

View File

@ -1,4 +1,4 @@
Source: folly
Version: v2017.07.17.01-1
Version: v2017.10.02.00
Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows
Build-Depends: zlib, openssl, boost, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy

View File

@ -0,0 +1,22 @@
diff --git a/folly/io/async/AsyncSocket.cpp b/folly/io/async/AsyncSocket.cpp
index 7f8c5f13..f77adbc0 100644
--- a/folly/io/async/AsyncSocket.cpp
+++ b/folly/io/async/AsyncSocket.cpp
@@ -41,7 +41,7 @@ namespace fsp = folly::portability::sockets;
namespace folly {
static constexpr bool msgErrQueueSupported =
-#ifdef MSG_ERRQUEUE
+#if defined(MSG_ERRQUEUE) && !defined(_WIN32)
true;
#else
false;
@@ -1551,7 +1551,7 @@ void AsyncSocket::handleErrMessages() noexcept {
return;
}
-#ifdef MSG_ERRQUEUE
+#if defined(MSG_ERRQUEUE) && !defined(_WIN32)
uint8_t ctrl[1024];
unsigned char data;
struct msghdr msg;

View File

@ -0,0 +1,11 @@
--- a/folly/stats/Histogram.h
+++ b/folly/stats/Histogram.h
@@ -485,7 +485,7 @@
// with /permissive- (the default for the CMake build), so we directly include
// the -defs as if it were -inl, and don't provide the explicit instantiations.
// https://developercommunity.visualstudio.com/content/problem/81223/incorrect-error-c5037-with-permissive.html
-#if defined(_MSC_VER) && _MSC_FULL_VER >= 191125506 && _MSC_FULL_VER < 191125542
+#if defined(_MSC_VER) && _MSC_FULL_VER >= 191125506 && _MSC_FULL_VER <= 191125547
#define FOLLY_MSVC_USE_WORKAROUND_FOR_C5037 1
#else
#define FOLLY_MSVC_USE_WORKAROUND_FOR_C5037 0

View File

@ -0,0 +1,12 @@
--- a/folly/Malloc.h Mon Oct 09 04:35:09 2017
+++ b/folly/Malloc.h Fri Oct 13 15:31:36 2017
@@ -189,9 +189,6 @@
return false;
}
- /* Avoid optimizing away the malloc. */
- asm volatile("" ::"m"(ptr) : "memory");
-
return (origAllocated != *counter);
}();

View File

@ -2,6 +2,10 @@ if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
message(FATAL_ERROR "Folly only supports the x64 architecture.")
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
message(FATAL_ERROR "Folly can't link with static libraries.")
endif()
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
set(VCPKG_LIBRARY_LINKAGE static)
@ -17,11 +21,20 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO facebook/folly
REF v2017.07.17.01
SHA512 1529941ebcc9ee3502e4ab07463bb5bc6a397259cbbf1817ac64fd186fd4cd964ffe8b473fe6a432e80632ffa553106a0d3fe2962e860eb409e3391029ed5584
REF v2017.10.02.00
SHA512 4fc7840c7a6c528c8ba6a21817bc75f15f5cd5f781d104a1f0622fe1085a6cb26ff9749616b164afff0ea46be6d16877457a98f417e6dbe1044db7605650a6d3
HEAD_REF master
)
vcpkg_apply_patches(
SOURCE_PATH
${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/fix-malloc.diff
${CMAKE_CURRENT_LIST_DIR}/fix-MSG_ERRQUEUE.diff
${CMAKE_CURRENT_LIST_DIR}/fix-histogram.diff
)
if(VCPKG_CRT_LINKAGE STREQUAL static)
set(MSVC_USE_STATIC_RUNTIME ON)
else()