Roll abseil_revision 4bbdb02689..e517aaf499
Change Log:
https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+log/4bbdb02689..e517aaf499
Full diff:
https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+/4bbdb02689..e517aaf499
Bug: None
Change-Id: I88b1e70e7c9b8c5bd1680591ed8ec7ab26c9459b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3757735
Auto-Submit: Mirko Bonadei <mbonadei@chromium.org>
Reviewed-by: Danil Chapovalov <danilchap@chromium.org>
Commit-Queue: Danil Chapovalov <danilchap@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1023661}
NOKEYCHECK=True
GitOrigin-RevId: b7a64e8fbfb8e217c4d0290039acbef11dc534e4
diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
index 6d03381..f81d57c 100644
--- a/CMake/AbseilHelpers.cmake
+++ b/CMake/AbseilHelpers.cmake
@@ -166,6 +166,9 @@
set(PC_CFLAGS "${PC_CFLAGS} ${cflag}")
elseif(${cflag} MATCHES "^(-W|/w[1234eo])")
# Don't impose our warnings on others.
+ elseif(${cflag} MATCHES "^-m")
+ # Don't impose CPU instruction requirements on others, as
+ # the code performs feature detection on runtime.
else()
set(PC_CFLAGS "${PC_CFLAGS} ${cflag}")
endif()
@@ -258,10 +261,10 @@
endif()
if(ABSL_PROPAGATE_CXX_STD)
- # Abseil libraries require C++11 as the current minimum standard.
+ # Abseil libraries require C++14 as the current minimum standard.
# Top-level application CMake projects should ensure a consistent C++
# standard for all compiled sources by setting CMAKE_CXX_STANDARD.
- target_compile_features(${_NAME} PUBLIC cxx_std_11)
+ target_compile_features(${_NAME} PUBLIC cxx_std_14)
else()
# Note: This is legacy (before CMake 3.8) behavior. Setting the
# target-level CXX_STANDARD property to ABSL_CXX_STANDARD (which is
@@ -306,10 +309,10 @@
target_compile_definitions(${_NAME} INTERFACE ${ABSL_CC_LIB_DEFINES})
if(ABSL_PROPAGATE_CXX_STD)
- # Abseil libraries require C++11 as the current minimum standard.
+ # Abseil libraries require C++14 as the current minimum standard.
# Top-level application CMake projects should ensure a consistent C++
# standard for all compiled sources by setting CMAKE_CXX_STANDARD.
- target_compile_features(${_NAME} INTERFACE cxx_std_11)
+ target_compile_features(${_NAME} INTERFACE cxx_std_14)
# (INTERFACE libraries can't have the CXX_STANDARD property set, so there
# is no legacy behavior else case).
@@ -418,10 +421,10 @@
set_property(TARGET ${_NAME} PROPERTY FOLDER ${ABSL_IDE_FOLDER}/test)
if(ABSL_PROPAGATE_CXX_STD)
- # Abseil libraries require C++11 as the current minimum standard.
+ # Abseil libraries require C++14 as the current minimum standard.
# Top-level application CMake projects should ensure a consistent C++
# standard for all compiled sources by setting CMAKE_CXX_STANDARD.
- target_compile_features(${_NAME} PUBLIC cxx_std_11)
+ target_compile_features(${_NAME} PUBLIC cxx_std_14)
else()
# Note: This is legacy (before CMake 3.8) behavior. Setting the
# target-level CXX_STANDARD property to ABSL_CXX_STANDARD (which is
diff --git a/CMake/README.md b/CMake/README.md
index 8134615..0be3b92 100644
--- a/CMake/README.md
+++ b/CMake/README.md
@@ -43,8 +43,8 @@
project(my_app_project)
# Pick the C++ standard to compile with.
-# Abseil currently supports C++11, C++14, and C++17.
-set(CMAKE_CXX_STANDARD 11)
+# Abseil currently supports C++14, C++17, and C++20.
+set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_subdirectory(abseil-cpp)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a20d04..10acf3b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,7 +64,7 @@
endif()
option(ABSL_PROPAGATE_CXX_STD
- "Use CMake C++ standard meta features (e.g. cxx_std_11) that propagate to targets that link to Abseil"
+ "Use CMake C++ standard meta features (e.g. cxx_std_14) that propagate to targets that link to Abseil"
OFF) # TODO: Default to ON for CMake 3.8 and greater.
if((${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.8) AND (NOT ABSL_PROPAGATE_CXX_STD))
message(WARNING "A future Abseil release will default ABSL_PROPAGATE_CXX_STD to ON for CMake 3.8 and up. We recommend enabling this option to ensure your project still builds correctly.")
diff --git a/README.chromium b/README.chromium
index 6dac6cf..b34551a 100644
--- a/README.chromium
+++ b/README.chromium
@@ -4,7 +4,7 @@
License: Apache 2.0
License File: LICENSE
Version: 0
-Revision: 4bbdb026899fea9f882a95cbd7d6a4adaf49b2dd
+Revision: e517aaf499f88383000d4ddf6b84417fbbb48791
Security Critical: yes
Description:
diff --git a/README.md b/README.md
index db3a7b4..8979002 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# Abseil - C++ Common Libraries
The repository contains the Abseil C++ library code. Abseil is an open-source
-collection of C++ code (compliant to C++11) designed to augment the C++
+collection of C++ code (compliant to C++14) designed to augment the C++
standard library.
## Table of Contents
@@ -85,13 +85,14 @@
<br /> The `hash` library contains the hashing framework and default hash
functor implementations for hashable types in Abseil.
* [`memory`](absl/memory/)
- <br /> The `memory` library contains C++11-compatible versions of
- `std::make_unique()` and related memory management facilities.
+ <br /> The `memory` library contains memory management facilities that
+ augment C++'s `<memory>` library.
* [`meta`](absl/meta/)
- <br /> The `meta` library contains C++11-compatible versions of type checks
+ <br /> The `meta` library contains compatible versions of type checks
available within C++14 and C++17 versions of the C++ `<type_traits>` library.
* [`numeric`](absl/numeric/)
- <br /> The `numeric` library contains C++11-compatible 128-bit integers.
+ <br /> The `numeric` library contains 128-bit integer types as well as
+ implementations of C++20's bitwise math functions.
* [`profiling`](absl/profiling/)
<br /> The `profiling` library contains utility code for profiling C++
entities. It is currently a private dependency of other Abseil libraries.
@@ -100,7 +101,7 @@
`absl::Status` and `absl::StatusOr<T>`.
* [`strings`](absl/strings/)
<br /> The `strings` library contains a variety of strings routines and
- utilities, including a C++11-compatible version of the C++17
+ utilities, including a C++14-compatible version of the C++17
`std::string_view` type.
* [`synchronization`](absl/synchronization/)
<br /> The `synchronization` library contains concurrency primitives (Abseil's
@@ -112,7 +113,7 @@
time zones.
* [`types`](absl/types/)
<br /> The `types` library contains non-container utility types, like a
- C++11-compatible version of the C++17 `std::optional` type.
+ C++14-compatible version of the C++17 `std::optional` type.
* [`utility`](absl/utility/)
<br /> The `utility` library contains utility and helper code.
diff --git a/absl/base/policy_checks.h b/absl/base/policy_checks.h
index 06b3243..d13073c 100644
--- a/absl/base/policy_checks.h
+++ b/absl/base/policy_checks.h
@@ -50,11 +50,11 @@
#error "This package requires Visual Studio 2015 Update 2 or higher."
#endif
-// We support gcc 4.7 and later.
+// We support gcc 5 and later.
// This minimum will go up.
#if defined(__GNUC__) && !defined(__clang__)
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7)
-#error "This package requires gcc 4.7 or higher."
+#if __GNUC__ < 5
+#error "This package requires gcc 5 or higher."
#endif
#endif
@@ -69,13 +69,15 @@
// C++ Version Check
// -----------------------------------------------------------------------------
-// Enforce C++11 as the minimum. Note that Visual Studio has not
-// advanced __cplusplus despite being good enough for our purposes, so
-// so we exempt it from the check.
-#if defined(__cplusplus) && !defined(_MSC_VER)
-#if __cplusplus < 201103L
-#error "C++ versions less than C++11 are not supported."
-#endif
+// Enforce C++14 as the minimum.
+#if defined(_MSVC_LANG)
+#if _MSVC_LANG < 201402L
+#error "C++ versions less than C++14 are not supported."
+#endif // _MSVC_LANG < 201402L
+#elif defined(__cplusplus)
+#if __cplusplus < 201402L
+#error "C++ versions less than C++14 are not supported."
+#endif // __cplusplus < 201402L
#endif
// -----------------------------------------------------------------------------
diff --git a/absl/debugging/internal/stacktrace_riscv-inl.inc b/absl/debugging/internal/stacktrace_riscv-inl.inc
index ba0775b..7123b71 100644
--- a/absl/debugging/internal/stacktrace_riscv-inl.inc
+++ b/absl/debugging/internal/stacktrace_riscv-inl.inc
@@ -159,21 +159,6 @@
const uintptr_t max_size = STRICT_UNWINDING ? 100000 : 1000000;
const uintptr_t frame_size =
ComputeStackFrameSize(old_frame_pointer, new_frame_pointer);
-
- // If we have a alternate signal stack, the stack pointer may not be
- // contiguous. In such a case, we can simply skip the check and assume that
- // the non-contiguity is permissible.
- if (frame_size == kUnknownFrameSize) {
- assert(old_frame_pointer >= new_frame_pointer);
-
- stack_t ss{};
- if (sigaltstack(nullptr, &ss) == 0) {
- if (ss.ss_flags & SS_DISABLE)
- return nullptr;
- return new_frame_pointer;
- }
- }
-
if (frame_size == kUnknownFrameSize || frame_size > max_size)
return nullptr;
}
diff --git a/absl/random/BUILD.bazel b/absl/random/BUILD.bazel
index 08ecd19..ff20dd0 100644
--- a/absl/random/BUILD.bazel
+++ b/absl/random/BUILD.bazel
@@ -306,6 +306,7 @@
cc_test(
name = "exponential_distribution_test",
size = "small",
+ timeout = "moderate",
srcs = ["exponential_distribution_test.cc"],
copts = ABSL_TEST_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
diff --git a/absl/strings/string_view.h b/absl/strings/string_view.h
index e3239f5..eae11b2 100644
--- a/absl/strings/string_view.h
+++ b/absl/strings/string_view.h
@@ -63,12 +63,6 @@
#define ABSL_INTERNAL_STRING_VIEW_MEMCMP memcmp
#endif // ABSL_HAVE_BUILTIN(__builtin_memcmp)
-#if defined(__cplusplus) && __cplusplus >= 201402L
-#define ABSL_INTERNAL_STRING_VIEW_CXX14_CONSTEXPR constexpr
-#else
-#define ABSL_INTERNAL_STRING_VIEW_CXX14_CONSTEXPR
-#endif
-
namespace absl {
ABSL_NAMESPACE_BEGIN
@@ -341,7 +335,7 @@
//
// Removes the first `n` characters from the `string_view`. Note that the
// underlying string is not changed, only the view.
- ABSL_INTERNAL_STRING_VIEW_CXX14_CONSTEXPR void remove_prefix(size_type n) {
+ constexpr void remove_prefix(size_type n) {
ABSL_HARDENING_ASSERT(n <= length_);
ptr_ += n;
length_ -= n;
@@ -351,7 +345,7 @@
//
// Removes the last `n` characters from the `string_view`. Note that the
// underlying string is not changed, only the view.
- ABSL_INTERNAL_STRING_VIEW_CXX14_CONSTEXPR void remove_suffix(size_type n) {
+ constexpr void remove_suffix(size_type n) {
ABSL_HARDENING_ASSERT(n <= length_);
length_ -= n;
}
@@ -359,7 +353,7 @@
// string_view::swap()
//
// Swaps this `string_view` with another `string_view`.
- ABSL_INTERNAL_STRING_VIEW_CXX14_CONSTEXPR void swap(string_view& s) noexcept {
+ constexpr void swap(string_view& s) noexcept {
auto t = *this;
*this = s;
s = t;
@@ -678,7 +672,6 @@
ABSL_NAMESPACE_END
} // namespace absl
-#undef ABSL_INTERNAL_STRING_VIEW_CXX14_CONSTEXPR
#undef ABSL_INTERNAL_STRING_VIEW_MEMCMP
#endif // ABSL_USES_STD_STRING_VIEW