Skip to content

Commit

Permalink
Roll abseil_revision c6c3c1b498..4ef574064e.
Browse files Browse the repository at this point in the history
Change Log:
https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+log/c6c3c1b498..4ef574064e
Full diff:
https://chromium.googlesource.com/external/github.com/abseil/abseil-cpp/+/c6c3c1b498..4ef574064e

Bug: None
Change-Id: Idfa04070603a5a01718a937d1cdde15c0e2b7eef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1748889
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686137}
  • Loading branch information
Mirko Bonadei authored and Commit Bot committed Aug 12, 2019
1 parent c004773 commit 165091a
Show file tree
Hide file tree
Showing 62 changed files with 9,229 additions and 765 deletions.
2 changes: 1 addition & 1 deletion third_party/abseil-cpp/README.chromium
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ URL: https://github.com/abseil/abseil-cpp
License: Apache 2.0
License File: LICENSE
Version: 0
Revision: c6c3c1b498e4ee939b24be59cae29d59c3863be8
Revision: 4ef574064e75b86f115549e9eb4c7e806781b3ab
Security Critical: yes

Description:
Expand Down
2 changes: 1 addition & 1 deletion third_party/abseil-cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ the Abseil code, running tests, and getting a simple binary working.
## Building Abseil

[Bazel](https://bazel.build) is the official build system for Abseil,
which is supported on most major platforms (Linux, Windows, MacOS, for example)
which is supported on most major platforms (Linux, Windows, macOS, for example)
and compilers. See the [quickstart](https://abseil.io/docs/cpp/quickstart) for
more information on building Abseil using the Bazel build system.

Expand Down
1 change: 1 addition & 0 deletions third_party/abseil-cpp/absl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ add_subdirectory(hash)
add_subdirectory(memory)
add_subdirectory(meta)
add_subdirectory(numeric)
add_subdirectory(random)
add_subdirectory(strings)
add_subdirectory(synchronization)
add_subdirectory(time)
Expand Down
39 changes: 35 additions & 4 deletions third_party/abseil-cpp/absl/base/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,34 @@ package(default_visibility = ["//visibility:public"])

licenses(["notice"]) # Apache 2.0

cc_library(
name = "atomic_hook",
hdrs = ["internal/atomic_hook.h"],
copts = ABSL_DEFAULT_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [
"//absl:__subpackages__",
],
)

cc_library(
name = "log_severity",
srcs = ["log_severity.cc"],
hdrs = ["log_severity.h"],
copts = ABSL_DEFAULT_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [":core_headers"],
)

cc_library(
name = "raw_logging_internal",
copts = ABSL_DEFAULT_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [
"//absl:__subpackages__",
],
)

cc_library(
name = "spinlock_wait",
srcs = [
Expand Down Expand Up @@ -127,6 +155,9 @@ cc_library(
visibility = [
"//absl:__subpackages__",
],
deps = [
"//absl/meta:type_traits",
],
)

cc_library(
Expand All @@ -138,12 +169,10 @@ cc_library(
"internal/sysinfo.cc",
"internal/thread_identity.cc",
"internal/unscaledcycleclock.cc",
"log_severity.cc",
],
hdrs = [
"call_once.h",
"casts.h",
"internal/atomic_hook.h",
"internal/cycleclock.h",
"internal/low_level_scheduling.h",
"internal/per_thread_tls.h",
Expand All @@ -153,18 +182,19 @@ cc_library(
"internal/thread_identity.h",
"internal/tsan_mutex_interface.h",
"internal/unscaledcycleclock.h",
"log_severity.h",
],
copts = ABSL_DEFAULT_COPTS,
linkopts = select({
"//absl:windows": [],
"//conditions:default": ["-pthread"],
}) + ABSL_DEFAULT_LINKOPTS,
deps = [
":atomic_hook",
":base_internal",
":config",
":core_headers",
":dynamic_annotations",
":log_severity",
":spinlock_wait",
"//absl/meta:type_traits",
],
Expand All @@ -177,7 +207,7 @@ cc_test(
copts = ABSL_TEST_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":base",
":atomic_hook",
":core_headers",
"@com_google_googletest//:gtest_main",
],
Expand Down Expand Up @@ -536,6 +566,7 @@ cc_test(
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":base",
":log_severity",
"@com_google_googletest//:gtest_main",
],
)
54 changes: 51 additions & 3 deletions third_party/abseil-cpp/absl/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,52 @@ if (build_with_chromium) {
visibility = [ "*" ]
}

source_set("atomic_hook") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
"//third_party/abseil-cpp:absl_default_cflags_cc",
]
public_configs = [ "//third_party/abseil-cpp:absl_include_config" ]
public = [
"internal/atomic_hook.h",
]
deps = [
":core_headers",
]
visibility = []
visibility += [ "../*" ]
}

source_set("log_severity") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
"//third_party/abseil-cpp:absl_default_cflags_cc",
]
public_configs = [ "//third_party/abseil-cpp:absl_include_config" ]
sources = [
"log_severity.cc",
]
public = [
"log_severity.h",
]
deps = [
":core_headers",
]
}

source_set("raw_logging_internal") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
"//third_party/abseil-cpp:absl_default_cflags_cc",
]
public_configs = [ "//third_party/abseil-cpp:absl_include_config" ]
visibility = []
visibility += [ "../*" ]
}

source_set("spinlock_wait") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
Expand Down Expand Up @@ -139,6 +185,9 @@ source_set("base_internal") {
"internal/invoke.h",
"internal/scheduling_mode.h",
]
deps = [
"../meta:type_traits",
]
visibility = []
visibility += [ "../*" ]
}
Expand All @@ -157,12 +206,10 @@ source_set("base") {
"internal/sysinfo.cc",
"internal/thread_identity.cc",
"internal/unscaledcycleclock.cc",
"log_severity.cc",
]
public = [
"call_once.h",
"casts.h",
"internal/atomic_hook.h",
"internal/cycleclock.h",
"internal/low_level_scheduling.h",
"internal/per_thread_tls.h",
Expand All @@ -172,13 +219,14 @@ source_set("base") {
"internal/thread_identity.h",
"internal/tsan_mutex_interface.h",
"internal/unscaledcycleclock.h",
"log_severity.h",
]
deps = [
":atomic_hook",
":base_internal",
":config",
":core_headers",
":dynamic_annotations",
":log_severity",
":spinlock_wait",
"../meta:type_traits",
]
Expand Down
37 changes: 35 additions & 2 deletions third_party/abseil-cpp/absl/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,35 @@
# limitations under the License.
#

absl_cc_library(
NAME
atomic_hook
HDRS
"internal/atomic_hook.h"
COPTS
${ABSL_DEFAULT_COPTS}
)

absl_cc_library(
NAME
log_severity
HDRS
"log_severity.h"
SRCS
"log_severity.cc"
DEPS
absl::core_headers
COPTS
${ABSL_DEFAULT_COPTS}
)

absl_cc_library(
NAME
raw_logging_internal
COPTS
${ABSL_DEFAULT_COPTS}
)

absl_cc_library(
NAME
spinlock_wait
Expand Down Expand Up @@ -104,6 +133,8 @@ absl_cc_library(
"internal/invoke.h"
COPTS
${ABSL_DEFAULT_COPTS}
DEPS
absl::type_traits
)

absl_cc_library(
Expand All @@ -112,7 +143,6 @@ absl_cc_library(
HDRS
"call_once.h"
"casts.h"
"internal/atomic_hook.h"
"internal/cycleclock.h"
"internal/low_level_scheduling.h"
"internal/per_thread_tls.h"
Expand All @@ -134,10 +164,12 @@ absl_cc_library(
COPTS
${ABSL_DEFAULT_COPTS}
DEPS
absl::atomic_hook
absl::base_internal
absl::config
absl::core_headers
absl::dynamic_annotations
absl::log_severity
absl::spinlock_wait
absl::type_traits
Threads::Threads
Expand Down Expand Up @@ -227,7 +259,7 @@ absl_cc_test(
COPTS
${ABSL_TEST_COPTS}
DEPS
absl::base
absl::atomic_hook
absl::core_headers
gtest_main
)
Expand Down Expand Up @@ -494,6 +526,7 @@ absl_cc_test(
"log_severity_test.cc"
DEPS
absl::base
absl::log_severity
gmock
gtest_main
)
29 changes: 19 additions & 10 deletions third_party/abseil-cpp/absl/base/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
// Linux and Linux-derived __linux__
// Android __ANDROID__ (implies __linux__)
// Linux (non-Android) __linux__ && !__ANDROID__
// Darwin (Mac OS X and iOS) __APPLE__
// Darwin (macOS and iOS) __APPLE__
// Akaros (http://akaros.org) __ros__
// Windows _WIN32
// NaCL __native_client__
Expand Down Expand Up @@ -370,16 +370,25 @@
#error "absl endian detection needs to be set up for your compiler"
#endif

// MacOS 10.13 doesn't let you use <any>, <optional>, or <variant> even though
// the headers exist and are publicly noted to work. See
// macOS 10.13 and iOS 10.11 don't let you use <any>, <optional>, or <variant>
// even though the headers exist and are publicly noted to work. See
// https://github.com/abseil/abseil-cpp/issues/207 and
// https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
// libc++ spells out the availability requirements in the file
// llvm-project/libcxx/include/__config via the #define
// _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS.
#if defined(__APPLE__) && defined(_LIBCPP_VERSION) && \
defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101400
#define ABSL_INTERNAL_MACOS_CXX17_TYPES_UNAVAILABLE 1
((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101400) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \
__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 120000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && \
__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 120000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && \
__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 50000))
#define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 1
#else
#define ABSL_INTERNAL_MACOS_CXX17_TYPES_UNAVAILABLE 0
#define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 0
#endif

// ABSL_HAVE_STD_ANY
Expand All @@ -391,7 +400,7 @@

#ifdef __has_include
#if __has_include(<any>) && __cplusplus >= 201703L && \
!ABSL_INTERNAL_MACOS_CXX17_TYPES_UNAVAILABLE
!ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE
#define ABSL_HAVE_STD_ANY 1
#endif
#endif
Expand All @@ -405,7 +414,7 @@

#ifdef __has_include
#if __has_include(<optional>) && __cplusplus >= 201703L && \
!ABSL_INTERNAL_MACOS_CXX17_TYPES_UNAVAILABLE
!ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE
#define ABSL_HAVE_STD_OPTIONAL 1
#endif
#endif
Expand All @@ -419,7 +428,7 @@

#ifdef __has_include
#if __has_include(<variant>) && __cplusplus >= 201703L && \
!ABSL_INTERNAL_MACOS_CXX17_TYPES_UNAVAILABLE
!ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE
#define ABSL_HAVE_STD_VARIANT 1
#endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion third_party/abseil-cpp/absl/base/internal/endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifdef _MSC_VER
#include <stdlib.h> // NOLINT(build/include)
#elif defined(__APPLE__)
// Mac OS X / Darwin features
// macOS / Darwin features
#include <libkern/OSByteOrder.h>
#elif defined(__FreeBSD__)
#include <sys/endian.h>
Expand Down

0 comments on commit 165091a

Please sign in to comment.