mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[abseil] Revert changes about arm build (#14109)
This commit is contained in:
parent
53f9a328a9
commit
75e24fa124
@ -1,65 +0,0 @@
|
||||
diff --git a/absl/container/internal/compressed_tuple.h b/absl/container/internal/compressed_tuple.h
|
||||
index 4bfe92f..02bfd03 100644
|
||||
--- a/absl/container/internal/compressed_tuple.h
|
||||
+++ b/absl/container/internal/compressed_tuple.h
|
||||
@@ -169,9 +169,33 @@ constexpr bool ShouldAnyUseBase() {
|
||||
}
|
||||
|
||||
template <typename T, typename V>
|
||||
-using TupleMoveConstructible = typename std::conditional<
|
||||
- std::is_reference<T>::value, std::is_convertible<V, T>,
|
||||
- std::is_constructible<T, V&&>>::type;
|
||||
+using TupleElementMoveConstructible =
|
||||
+ typename std::conditional<std::is_reference<T>::value,
|
||||
+ std::is_convertible<V, T>,
|
||||
+ std::is_constructible<T, V&&>>::type;
|
||||
+
|
||||
+template <bool SizeMatches, class T, class... Vs>
|
||||
+struct TupleMoveConstructible : std::false_type {};
|
||||
+
|
||||
+template <class... Ts, class... Vs>
|
||||
+struct TupleMoveConstructible<true, CompressedTuple<Ts...>, Vs...>
|
||||
+ : std::integral_constant<
|
||||
+ bool, absl::conjunction<
|
||||
+ TupleElementMoveConstructible<Ts, Vs&&>...>::value> {};
|
||||
+
|
||||
+template <typename T>
|
||||
+struct compressed_tuple_size;
|
||||
+
|
||||
+template <typename... Es>
|
||||
+struct compressed_tuple_size<CompressedTuple<Es...>>
|
||||
+ : public std::integral_constant<std::size_t, sizeof...(Es)> {};
|
||||
+
|
||||
+template <class T, class... Vs>
|
||||
+struct TupleItemsMoveConstructible
|
||||
+ : std::integral_constant<
|
||||
+ bool, TupleMoveConstructible<compressed_tuple_size<T>::value ==
|
||||
+ sizeof...(Vs),
|
||||
+ T, Vs...>::value> {};
|
||||
|
||||
} // namespace internal_compressed_tuple
|
||||
|
||||
@@ -217,17 +241,18 @@ class ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTuple
|
||||
explicit constexpr CompressedTuple(const Ts&... base)
|
||||
: CompressedTuple::CompressedTupleImpl(absl::in_place, base...) {}
|
||||
|
||||
- template <typename... Vs,
|
||||
+ template <typename First, typename... Vs,
|
||||
absl::enable_if_t<
|
||||
absl::conjunction<
|
||||
// Ensure we are not hiding default copy/move constructors.
|
||||
absl::negation<std::is_same<void(CompressedTuple),
|
||||
- void(absl::decay_t<Vs>...)>>,
|
||||
- internal_compressed_tuple::TupleMoveConstructible<
|
||||
- Ts, Vs&&>...>::value,
|
||||
+ void(absl::decay_t<First>)>>,
|
||||
+ internal_compressed_tuple::TupleItemsMoveConstructible<
|
||||
+ CompressedTuple<Ts...>, First, Vs...>>::value,
|
||||
bool> = true>
|
||||
- explicit constexpr CompressedTuple(Vs&&... base)
|
||||
+ explicit constexpr CompressedTuple(First&& first, Vs&&... base)
|
||||
: CompressedTuple::CompressedTupleImpl(absl::in_place,
|
||||
+ absl::forward<First>(first),
|
||||
absl::forward<Vs>(base)...) {}
|
||||
|
||||
template <int I>
|
@ -1,23 +0,0 @@
|
||||
diff --git a/absl/time/internal/cctz/src/zone_info_source.cc b/absl/time/internal/cctz/src/zone_info_source.cc
|
||||
index 98ea161..3f75d56 100644
|
||||
--- a/absl/time/internal/cctz/src/zone_info_source.cc
|
||||
+++ b/absl/time/internal/cctz/src/zone_info_source.cc
|
||||
@@ -65,7 +65,7 @@ ZoneInfoSourceFactory zone_info_source_factory __attribute__((weak)) =
|
||||
extern ZoneInfoSourceFactory zone_info_source_factory;
|
||||
extern ZoneInfoSourceFactory default_factory;
|
||||
ZoneInfoSourceFactory default_factory = DefaultFactory;
|
||||
-#if defined(_M_IX86)
|
||||
+#if defined(_M_IX86) || ((defined(_M_ARM) || defined(_M_ARM64)) && defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP))
|
||||
#pragma comment( \
|
||||
linker, \
|
||||
"/alternatename:?zone_info_source_factory@cctz_extension@time_internal@" ABSL_INTERNAL_MANGLED_NS \
|
||||
@@ -83,7 +83,8 @@ ZoneInfoSourceFactory default_factory = DefaultFactory;
|
||||
"@@U?$default_delete@VZoneInfoSource@cctz@time_internal@" ABSL_INTERNAL_MANGLED_NS \
|
||||
"@@@std@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z@" ABSL_INTERNAL_MANGLED_BACKREFERENCE \
|
||||
"@@ZA")
|
||||
-#elif defined(_M_IA_64) || defined(_M_AMD64) || defined(_M_ARM64)
|
||||
+#elif defined(_M_IA_64) || defined(_M_AMD64) || defined(_M_ARM) || \
|
||||
+ defined(_M_ARM64)
|
||||
#pragma comment( \
|
||||
linker, \
|
||||
"/alternatename:?zone_info_source_factory@cctz_extension@time_internal@" ABSL_INTERNAL_MANGLED_NS \
|
@ -1,13 +0,0 @@
|
||||
diff --git a/CMake/abslConfig.cmake.in b/CMake/abslConfig.cmake.in
|
||||
index 60847fa77..6d23f63d3 100644
|
||||
--- a/CMake/abslConfig.cmake.in
|
||||
+++ b/CMake/abslConfig.cmake.in
|
||||
@@ -1,6 +1,7 @@
|
||||
# absl CMake configuration file.
|
||||
|
||||
-include(FindThreads)
|
||||
+include(CMakeFindDependencyMacro)
|
||||
+find_dependency(Threads)
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
@ -1,66 +0,0 @@
|
||||
diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc
|
||||
index a0930e9..2ec5793 100644
|
||||
--- a/absl/base/internal/sysinfo.cc
|
||||
+++ b/absl/base/internal/sysinfo.cc
|
||||
@@ -72,6 +72,12 @@ static int GetNumCPUs() {
|
||||
#if defined(_WIN32)
|
||||
|
||||
static double GetNominalCPUFrequency() {
|
||||
+// UWP apps don't have access to the registry and currently don't provide an
|
||||
+// API informing about CPU nominal frequency.
|
||||
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
|
||||
+ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
+ return 1.0;
|
||||
+#else
|
||||
#pragma comment(lib, "advapi32.lib") // For Reg* functions.
|
||||
HKEY key;
|
||||
// Use the Reg* functions rather than the SH functions because shlwapi.dll
|
||||
@@ -91,6 +97,7 @@ static double GetNominalCPUFrequency() {
|
||||
}
|
||||
}
|
||||
return 1.0;
|
||||
+#endif // WINAPI_PARTITION_APP && !WINAPI_PARTITION_DESKTOP
|
||||
}
|
||||
|
||||
#elif defined(CTL_HW) && defined(HW_CPU_FREQ)
|
||||
diff --git a/absl/debugging/symbolize_win32.inc b/absl/debugging/symbolize_win32.inc
|
||||
index c3df46f..d324fc1 100644
|
||||
--- a/absl/debugging/symbolize_win32.inc
|
||||
+++ b/absl/debugging/symbolize_win32.inc
|
||||
@@ -36,6 +36,11 @@ ABSL_NAMESPACE_BEGIN
|
||||
static HANDLE process = NULL;
|
||||
|
||||
void InitializeSymbolizer(const char*) {
|
||||
+// UWP doesn't support this function
|
||||
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
|
||||
+ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
+ return;
|
||||
+#else
|
||||
if (process != nullptr) {
|
||||
return;
|
||||
}
|
||||
@@ -52,9 +57,16 @@ void InitializeSymbolizer(const char*) {
|
||||
const unsigned long long error{GetLastError()}; // NOLINT(runtime/int)
|
||||
ABSL_RAW_LOG(FATAL, "SymInitialize() failed: %llu", error);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
bool Symbolize(const void* pc, char* out, int out_size) {
|
||||
+
|
||||
+// UWP doesn't support this function
|
||||
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
|
||||
+ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
+ return false;
|
||||
+#else
|
||||
if (out_size <= 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -75,6 +87,7 @@ bool Symbolize(const void* pc, char* out, int out_size) {
|
||||
out[out_size - 1] = '\0';
|
||||
}
|
||||
return true;
|
||||
+#endif
|
||||
}
|
||||
|
||||
ABSL_NAMESPACE_END
|
@ -2,25 +2,13 @@ if (NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
endif()
|
||||
|
||||
set(ABSEIL_PATCHES
|
||||
fix-uwp-build.patch
|
||||
|
||||
# This patch is an upstream commit, the related PR: https://github.com/abseil/abseil-cpp/pull/637
|
||||
fix-MSVCbuildfail.patch
|
||||
|
||||
# Remove this patch in next update, see https://github.com/google/cctz/pull/145
|
||||
fix-arm-build.patch
|
||||
|
||||
# This patch is an upstream commit: https://github.com/abseil/abseil-cpp/commit/68494aae959dfbbf781cdf03a988d2f5fc7e4802
|
||||
fix-cmake-threads-dependency.patch
|
||||
)
|
||||
|
||||
if("cxx17" IN_LIST FEATURES)
|
||||
# in C++17 mode, use std::any, std::optional, std::string_view, std::variant
|
||||
# instead of the library replacement types
|
||||
list(APPEND ABSEIL_PATCHES fix-use-cxx17-stdlib-types.patch)
|
||||
else()
|
||||
# fore use of library replacement types, otherwise the automatic
|
||||
# force use of library replacement types, otherwise the automatic
|
||||
|
||||
# detection can cause ABI issues depending on which compiler options
|
||||
# are enabled for consuming user code
|
||||
list(APPEND ABSEIL_PATCHES fix-lnk2019-error.patch)
|
||||
@ -29,8 +17,8 @@ endif()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO abseil/abseil-cpp
|
||||
REF 06f0e767d13d4d68071c4fc51e25724e0fc8bc74 #commit 2020-03-03
|
||||
SHA512 f6e2302676ddae39d84d8ec92dbd13520ae214013b43455f14ced3ae6938b94cedb06cfc40eb1781dac48f02cd35ed80673ed2d871541ef4438c282a9a4133b9
|
||||
REF 0f3bb466b868b523cf1dc9b2aaaed65c77b28862 #LTS 20200923, Patch 2
|
||||
SHA512 17e766a2f7a655a3877eb3accc5745a910b69a5e2426b7ce7f6d31095523dd32d48a709c5f8380488b4cb93ce9faadedc08f0481dbdbd00cf68831541d724b4d
|
||||
HEAD_REF master
|
||||
PATCHES ${ABSEIL_PATCHES}
|
||||
)
|
||||
@ -70,4 +58,4 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
)
|
||||
endif()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "abseil",
|
||||
"version-string": "2020-03-03",
|
||||
"port-version": 8,
|
||||
"version-string": "2020-09-23",
|
||||
"description": [
|
||||
"an open-source collection designed to augment the C++ standard library.",
|
||||
"Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.",
|
||||
@ -9,6 +8,7 @@
|
||||
"Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole."
|
||||
],
|
||||
"homepage": "https://github.com/abseil/abseil-cpp",
|
||||
"supports": "(x64 | arm64) & (linux | osx | windows)",
|
||||
"features": {
|
||||
"cxx17": {
|
||||
"description": "Enable compiler C++17."
|
||||
|
Loading…
x
Reference in New Issue
Block a user