diff options
| author | Phoebe <20694052+PhoebeHui@users.noreply.github.com> | 2020-10-28 11:44:41 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-27 20:44:41 -0700 |
| commit | c34c4189ebbf0795e1f8e2de562c527a854c8db4 (patch) | |
| tree | ab47b097ec857cf97d9a74f740ab446b09c284dd /ports/folly | |
| parent | e765d96d6f6ee0c448869618db626254f5345624 (diff) | |
| download | vcpkg-c34c4189ebbf0795e1f8e2de562c527a854c8db4.tar.gz vcpkg-c34c4189ebbf0795e1f8e2de562c527a854c8db4.zip | |
[folly/fizz/wangle/proxygen/fbthrift] Update to latest revision (#13701)
Diffstat (limited to 'ports/folly')
| -rw-r--r-- | ports/folly/CONTROL | 5 | ||||
| -rw-r--r-- | ports/folly/boost-1.70.patch | 45 | ||||
| -rw-r--r-- | ports/folly/disable-non-underscore-posix-names.patch | 29 | ||||
| -rw-r--r-- | ports/folly/find-double-conversion.patch | 25 | ||||
| -rw-r--r-- | ports/folly/fix-addbit.patch | 15 | ||||
| -rw-r--r-- | ports/folly/fix-cmake-3.18.patch | 48 | ||||
| -rw-r--r-- | ports/folly/folly_c3861.patch | 50 | ||||
| -rw-r--r-- | ports/folly/portfile.cmake | 7 | ||||
| -rw-r--r-- | ports/folly/reorder-glog-gflags.patch | 16 |
9 files changed, 52 insertions, 188 deletions
diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index f5d2154cc..8b31a73b6 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,9 +1,8 @@ Source: folly -Version: 2019.10.21.00 -Port-Version: 5 +Version: 2020.10.19.00 Homepage: https://github.com/facebook/folly Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows -Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread, boost-smart-ptr +Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread, boost-smart-ptr, fmt Default-Features: zlib Supports: x64 diff --git a/ports/folly/boost-1.70.patch b/ports/folly/boost-1.70.patch index 98986b96c..bca0c99e0 100644 --- a/ports/folly/boost-1.70.patch +++ b/ports/folly/boost-1.70.patch @@ -1,23 +1,22 @@ -diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp -index 5cc3731..86a4a0b 100644 ---- a/folly/portability/PThread.cpp -+++ b/folly/portability/PThread.cpp -@@ -18,6 +18,9 @@ - - #if !FOLLY_HAVE_PTHREAD && defined(_WIN32) - #include <boost/thread/tss.hpp> // @manual -+#include <boost/thread/exceptions.hpp> -+#include <boost/shared_ptr.hpp> -+#include <boost/thread/thread_only.hpp> - - #include <errno.h> - -@@ -684,7 +687,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) { - // function, which we don't want to do. - boost::detail::set_tss_data( - realKey, -- boost::shared_ptr<boost::detail::tss_cleanup_function>(), -+ 0,0, - const_cast<void*>(value), - false); - return 0; +diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp
+index 2126ec0..ef82ade 100644
+--- a/folly/portability/PThread.cpp
++++ b/folly/portability/PThread.cpp
+@@ -20,6 +20,8 @@
+ #include <boost/thread/exceptions.hpp>
+ #include <boost/thread/tss.hpp>
+ #include <boost/version.hpp>
++#include <boost/shared_ptr.hpp>
++#include <boost/thread/thread_only.hpp>
+
+ #include <errno.h>
+
+@@ -691,7 +693,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) {
+ boost::detail::thread::cleanup_caller_t(),
+ boost::detail::thread::cleanup_func_t(),
+ #else
+- boost::shared_ptr<boost::detail::tss_cleanup_function>(),
++ 0,0,
+ #endif
+ const_cast<void*>(value),
+ false);
diff --git a/ports/folly/disable-non-underscore-posix-names.patch b/ports/folly/disable-non-underscore-posix-names.patch index bbe79481c..ad36fad7a 100644 --- a/ports/folly/disable-non-underscore-posix-names.patch +++ b/ports/folly/disable-non-underscore-posix-names.patch @@ -1,27 +1,34 @@ diff --git a/folly/portability/Windows.h b/folly/portability/Windows.h
-index f7990ca..b22fac5 100644
+index 86fd0f9..ccad11e 100644
--- a/folly/portability/Windows.h
+++ b/folly/portability/Windows.h
-@@ -26,16 +26,12 @@
- // These have to be this way because we define our own versions
- // of close(), because the normal Windows versions don't handle
- // sockets at all.
+@@ -32,24 +32,17 @@
+ // disabled to ensure all of the normal names get declared properly.
+ #include <stdio.h>
+
-#ifndef __STDC__
-/* nolint */
-#define __STDC__ 1
+ #pragma push_macro("_CRT_DECLARE_NONSTDC_NAMES")
+ #ifdef _CRT_DECLARE_NONSTDC_NAMES
+ #undef _CRT_DECLARE_NONSTDC_NAMES
+ #endif
++
++#include <corecrt.h>
+ #pragma push_macro("_CRT_INTERNAL_NONSTDC_NAMES")
+-#undef _CRT_INTERNAL_NONSTDC_NAMES
-#include <direct.h> // @manual nolint
-#include <io.h> // @manual nolint
-#undef __STDC__
++#define _CRT_INTERNAL_NONSTDC_NAMES 0
++#include <direct.h>
++#include <io.h>
+ #pragma pop_macro("_CRT_INTERNAL_NONSTDC_NAMES")
+-#pragma pop_macro("_CRT_DECLARE_NONSTDC_NAMES")
-#else
-#include <direct.h> // @manual nolint
-#include <io.h> // @manual nolint
-#endif
-+#include <corecrt.h>
-+#pragma push_macro("_CRT_INTERNAL_NONSTDC_NAMES")
-+#define _CRT_INTERNAL_NONSTDC_NAMES 0
-+#include <direct.h>
-+#include <io.h>
-+#pragma pop_macro("_CRT_INTERNAL_NONSTDC_NAMES")
#if defined(min) || defined(max)
#error Windows.h needs to be included by this header, or else NOMINMAX needs \
diff --git a/ports/folly/find-double-conversion.patch b/ports/folly/find-double-conversion.patch deleted file mode 100644 index 53f49e831..000000000 --- a/ports/folly/find-double-conversion.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake -index 1522db2..5ed2ea9 100644 ---- a/CMake/folly-deps.cmake -+++ b/CMake/folly-deps.cmake -@@ -17,9 +17,17 @@ find_package(Boost 1.51.0 MODULE - list(APPEND FOLLY_LINK_LIBRARIES ${Boost_LIBRARIES}) - list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) - --find_package(DoubleConversion MODULE REQUIRED) --list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) --list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) -+find_package(double-conversion CONFIG REQUIRED) -+if (double-conversion_FOUND) -+ message(STATUS "Found double-conversion from package config") -+ set(FOLLY_HAVE_DOUBLE_CONVERSION ON) -+ # How to obtain link libraries from target? double-conversion doesn't set property INTERFACE_LINK_LIBRARIES -+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) -+else() -+ find_package(DoubleConversion MODULE) -+ list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) -+ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) -+endif() - - set(FOLLY_HAVE_LIBGFLAGS OFF) - find_package(gflags CONFIG REQUIRED) diff --git a/ports/folly/fix-addbit.patch b/ports/folly/fix-addbit.patch deleted file mode 100644 index 6ac47aa06..000000000 --- a/ports/folly/fix-addbit.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/folly/lang/Bits.h b/folly/lang/Bits.h -index f0beb5b..f86a1a3 100644 ---- a/folly/lang/Bits.h -+++ b/folly/lang/Bits.h -@@ -64,6 +64,10 @@ - #include <folly/lang/Assume.h> - #include <folly/portability/Builtins.h> - -+#if __has_include(<bit>) -+#include <bit> -+#endif -+ - namespace folly { - - #if __cpp_lib_bit_cast diff --git a/ports/folly/fix-cmake-3.18.patch b/ports/folly/fix-cmake-3.18.patch deleted file mode 100644 index c4ba62c76..000000000 --- a/ports/folly/fix-cmake-3.18.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/CMake/GenPkgConfig.cmake b/CMake/GenPkgConfig.cmake -index f8701b4..00a1e75 100644 ---- a/CMake/GenPkgConfig.cmake -+++ b/CMake/GenPkgConfig.cmake -@@ -92,7 +92,19 @@ function(gen_pkgconfig_vars) - - # Set the output variables - string(REPLACE ";" " " cflags "${cflags}") -- set("${var_prefix}_CFLAGS" "${cflags}" PARENT_SCOPE) - string(REPLACE ";" " " private_libs "${private_libs}") -+ -+ # Since CMake 3.18 FindThreads may include a generator expression requiring -+ # a target, which gets propagated to us through INTERFACE_COMPILE_OPTIONS. -+ # Before CMake 3.19 there's no way to solve this in a general way, so we -+ # work around the specific case. See #1414 and CMake bug #21074. -+ if(CMAKE_VERSION VERSION_LESS 3.19) -+ string(REPLACE -+ "<COMPILE_LANG_AND_ID:CUDA,NVIDIA>" "<COMPILE_LANGUAGE:CUDA>" -+ cflags "${cflags}" -+ ) -+ endif() -+ -+ set("${var_prefix}_CFLAGS" "${cflags}" PARENT_SCOPE) - set("${var_prefix}_PRIVATE_LIBS" "${private_libs}" PARENT_SCOPE) - endfunction() -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2de9298..950dd76 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -414,10 +414,18 @@ configure_file( - ${CMAKE_CURRENT_BINARY_DIR}/libfolly.pc.gen - @ONLY - ) -+ -+# Specify target to allow resolving generator expressions requiring -+# a target for CMake >=3.19. See #1414. -+if(NOT CMAKE_VERSION VERSION_LESS 3.19) -+ set(target_arg TARGET folly_deps) -+endif() -+ - file( - GENERATE - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libfolly.pc - INPUT ${CMAKE_CURRENT_BINARY_DIR}/libfolly.pc.gen -+ ${target_arg} - ) - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/libfolly.pc diff --git a/ports/folly/folly_c3861.patch b/ports/folly/folly_c3861.patch deleted file mode 100644 index 52aefcb8e..000000000 --- a/ports/folly/folly_c3861.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h -index 971cb88..7894333 100644 ---- a/folly/portability/Builtins.h -+++ b/folly/portability/Builtins.h -@@ -41,7 +41,7 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { - } - } - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) -+// #if !defined(_MSC_VER) || (_MSC_VER < 1923) - FOLLY_ALWAYS_INLINE int __builtin_clz(unsigned int x) { - unsigned long index; - return int(_BitScanReverse(&index, (unsigned long)x) ? 31 - index : 32); -@@ -93,7 +93,7 @@ FOLLY_ALWAYS_INLINE int __builtin_ctzll(unsigned long long x) { - return int(_BitScanForward64(&index, x) ? index : 64); - } - #endif --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) -+// #endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - - FOLLY_ALWAYS_INLINE int __builtin_ffs(int x) { - unsigned long index; -@@ -119,15 +119,15 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) { - return int(__popcnt(x)); - } - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) -+// #if !defined(_MSC_VER) || (_MSC_VER < 1923) - FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) { - static_assert(sizeof(x) == 4, ""); - return int(__popcnt(x)); - } --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) -+// #endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - #endif - --#if !defined(_MSC_VER) || (_MSC_VER < 1923) -+// #if !defined(_MSC_VER) || (_MSC_VER < 1923) - #if defined(_M_IX86) - FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt((unsigned int)(x >> 32))) + -@@ -138,7 +138,7 @@ FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { - return int(__popcnt64(x)); - } - #endif --#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) -+// #endif // !defined(_MSC_VER) || (_MSC_VER < 1923) - - FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { - // I really hope frame is zero... diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 07d0093cb..3016caec9 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -12,17 +12,14 @@ vcpkg_add_to_path("${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF 8874256376d2f8a32867f17c9472a446d6707604 #2019.10.21.00 - SHA512 96dfdde34697b72e8eb88431d742fffa337fc9146677d63cf0331dc5e4cd341fb00b88edf3781488e3194fa41525e70a6729e1bb6657f224cd1969deea9b468c + REF 430aa0d8db79989dd56f8a0361fcb1c305618e41 # v2020.10.19.00 + SHA512 d9f6aa0f7a8aee044c01af289d71e4c80d63e40ff128ac840663e3103d19cdd0da161a0b0d106493d950b9ac9a905c5e2abf8c1970c2f16b94dd95c0d1b1943e HEAD_REF master PATCHES missing-include-atomic.patch reorder-glog-gflags.patch disable-non-underscore-posix-names.patch boost-1.70.patch - fix-addbit.patch - folly_c3861.patch - fix-cmake-3.18.patch # Remove this patch on the next update ) file(COPY diff --git a/ports/folly/reorder-glog-gflags.patch b/ports/folly/reorder-glog-gflags.patch index 85fd1d9fb..38ddbc166 100644 --- a/ports/folly/reorder-glog-gflags.patch +++ b/ports/folly/reorder-glog-gflags.patch @@ -1,22 +1,22 @@ diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
-index e0bbcbb..fb45331 100644
+index 92b8ce7..04589ed 100644
--- a/CMake/folly-deps.cmake
+++ b/CMake/folly-deps.cmake
-@@ -24,6 +24,11 @@ find_package(DoubleConversion MODULE REQUIRED)
+@@ -52,6 +52,11 @@ find_package(DoubleConversion MODULE REQUIRED)
list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY})
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR})
-+find_package(Glog MODULE)
++find_package(Glog CONFIG REQUIRED)
+set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND})
-+list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY})
++list(APPEND FOLLY_LINK_LIBRARIES glog::glog)
+list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR})
+
find_package(Gflags MODULE)
set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND})
- list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY})
-@@ -31,11 +36,6 @@ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBGFLAGS_INCLUDE_DIR})
- list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBGFLAGS_LIBRARY})
- list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBGFLAGS_INCLUDE_DIR})
+ if(LIBGFLAGS_FOUND)
+@@ -61,11 +66,6 @@ if(LIBGFLAGS_FOUND)
+ set(FOLLY_LIBGFLAGS_INCLUDE ${LIBGFLAGS_INCLUDE_DIR})
+ endif()
-find_package(Glog MODULE)
-set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND})
|
