2017-09-19 22:54:40 +02:00
|
|
|
#
|
|
|
|
# Copyright 2017 The Abseil Authors.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
2019-03-08 16:27:53 +01:00
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
2017-09-19 22:54:40 +02:00
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
|
2019-08-16 16:38:13 +02:00
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
|
2017-09-19 22:54:40 +02:00
|
|
|
load(
|
Export of internal Abseil changes.
--
22fa219d17b2281c0695642830c4300711bd65ea by CJ Johnson <johnsoncj@google.com>:
Rearrange the private method declarations in InlinedVector
PiperOrigin-RevId: 224202447
--
eed3c9f488f23b521bee41d3683eb6cc22517ded by Derek Mauro <dmauro@google.com>:
Fix leak_check target (it was always a no-op when LSAN isn't available).
Fixes https://github.com/abseil/abseil-cpp/issues/232
PiperOrigin-RevId: 224201634
--
fc08039e175204b14a9561f618fcfc0234586801 by Greg Falcon <gfalcon@google.com>:
Add parens around more invocations of min() and max() missed in my prior CL.
PiperOrigin-RevId: 224162430
--
0ec5476a8293c7796cd84928a1a558b14f14f222 by Abseil Team <absl-team@google.com>:
Update absl/numeric/CMakeLists.txt to use new functions
i.e. absl_cc_(library|test)
PiperOrigin-RevId: 224139165
--
2b46aa6fabb20c589661f8bbc84030ecf39ce394 by Abseil Team <absl-team@google.com>:
Update absl/meta/CMakeLists.txt to use new functions
i.e. absl_cc_(library|test)
PiperOrigin-RevId: 224117258
--
6c951c798f8c6903bd8793a8a4b5f69244be8aa9 by Abseil Team <absl-team@google.com>:
Fix 2 Unused C++ BUILD Dependencies
PiperOrigin-RevId: 224070093
--
0ee7bd191708708f91fc5209c197fd93f6e4a8b3 by Greg Falcon <gfalcon@google.com>:
Inside Abseil headers, wrap most invocations of methods and functions named `min` and `max` in parentheses, for better interoperability with Windows toolchains.
CCTZ fixes will appear in a follow-up CL.
PiperOrigin-RevId: 224051960
--
f562f56577b84a8bc07e5873775c01d068531bca by Jon Cohen <cohenjon@google.com>:
Generate Abseil compile options. The single source of truth is now absl/copts/copts.py
The way this works goes something like this:
copts.py acts as the configuration file. We use python because unlike JSON it allows comments. It has two maps in it: one from names to external flags, and one from names to internal flags.
generate_copts.py imports the maps and loops through them to write GENERATED_copts.bzl and GENERATED_AbseilCopts.cmake
AbseilConfigureCopts.cmake and configure_copts.bzl import their respective copts args and set the platform-appropriate copts into ABSL_DEFAULT_COPTS, ABSL_TEST_COPTS, ABSL_EXCEPTIONS_FLAG, and ABSL_EXCEPTIONS_LINKOPTS
For Bazel, each BUILD file load()s configure_copts.bzl
For CMake, AbseilHelpers.cmake include()s AbseilConfigureCopts.cmake to get the final copts and both inserts them as needed into legacy target rules and also makes them available to the rest of our CMakeLists.txt file. We may instead want to include() AbseilConfigureCopts.cmake directly into each CMakeLists.txt file for consistency, but I'm not sure what the deal is with cmake and include guards, or if they are even needed. That's also not as idiomatic -- CMake tends to use directory scope where globals set at a higher level CMakeLists.txt file are used in the subdirectory CMakeLists.txt files.
PiperOrigin-RevId: 224039419
--
f7402f6bb65037e668a7355f0a003f5c05a3b6a7 by Abseil Team <absl-team@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 224036622
GitOrigin-RevId: 22fa219d17b2281c0695642830c4300711bd65ea
Change-Id: I6b505360539ff2aef8aa30c51a5f7d55db1c75cf
2018-12-05 21:37:41 +01:00
|
|
|
"//absl:copts/configure_copts.bzl",
|
2017-09-19 22:54:40 +02:00
|
|
|
"ABSL_DEFAULT_COPTS",
|
2019-03-27 16:05:41 +01:00
|
|
|
"ABSL_DEFAULT_LINKOPTS",
|
2019-05-14 19:53:39 +02:00
|
|
|
"ABSL_TEST_COPTS",
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
licenses(["notice"]) # Apache 2.0
|
|
|
|
|
2019-07-18 18:04:43 +02:00
|
|
|
cc_library(
|
|
|
|
name = "atomic_hook",
|
|
|
|
hdrs = ["internal/atomic_hook.h"],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
visibility = [
|
|
|
|
"//absl:__subpackages__",
|
|
|
|
],
|
2020-02-04 23:18:00 +01:00
|
|
|
deps = [
|
|
|
|
":config",
|
|
|
|
":core_headers",
|
|
|
|
],
|
2019-07-18 18:04:43 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "log_severity",
|
2019-07-25 13:03:57 +02:00
|
|
|
srcs = ["log_severity.cc"],
|
|
|
|
hdrs = ["log_severity.h"],
|
2019-07-18 18:04:43 +02:00
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2019-12-10 18:03:32 +01:00
|
|
|
deps = [
|
|
|
|
":config",
|
|
|
|
":core_headers",
|
|
|
|
],
|
2019-07-18 18:04:43 +02:00
|
|
|
)
|
|
|
|
|
2019-07-30 16:36:25 +02:00
|
|
|
cc_library(
|
|
|
|
name = "raw_logging_internal",
|
2019-08-13 19:20:16 +02:00
|
|
|
srcs = ["internal/raw_logging.cc"],
|
|
|
|
hdrs = ["internal/raw_logging.h"],
|
2019-07-30 16:36:25 +02:00
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
visibility = [
|
|
|
|
"//absl:__subpackages__",
|
|
|
|
],
|
2019-08-13 19:20:16 +02:00
|
|
|
deps = [
|
|
|
|
":atomic_hook",
|
|
|
|
":config",
|
|
|
|
":core_headers",
|
|
|
|
":log_severity",
|
|
|
|
],
|
2019-07-30 16:36:25 +02:00
|
|
|
)
|
|
|
|
|
2017-09-19 22:54:40 +02:00
|
|
|
cc_library(
|
|
|
|
name = "spinlock_wait",
|
|
|
|
srcs = [
|
2017-10-24 19:37:49 +02:00
|
|
|
"internal/spinlock_akaros.inc",
|
2018-08-20 17:18:32 +02:00
|
|
|
"internal/spinlock_linux.inc",
|
2017-09-19 22:54:40 +02:00
|
|
|
"internal/spinlock_posix.inc",
|
|
|
|
"internal/spinlock_wait.cc",
|
|
|
|
"internal/spinlock_win32.inc",
|
|
|
|
],
|
Export of internal Abseil changes
--
f13697e3d33803f9667d124072da4f6dd8bfbf85 by Andy Soffer <asoffer@google.com>:
Addressing https://github.com/abseil/abseil-cpp/issues/314, fixing
CMakeLists.txt to reference ABSL_TEST_COPTS rather than ABSL_DEFAULT_COPTS.
ABSL_TEST_COPTS should be preferred for all tests so that they are configured consistently (moreover, CMake should agree with Bazel).
PiperOrigin-RevId: 274932312
--
c31c24a1fa6bb98136adf51ef37c0818ac366690 by Derek Mauro <dmauro@google.com>:
Silence MSAN in the stack consumption test utility
PiperOrigin-RevId: 274912950
--
2412913c05a246cd527cd4c31452f126e9129f3a by CJ Johnson <johnsoncj@google.com>:
Internal change
PiperOrigin-RevId: 274847103
--
75e984a93b5760873501b96ac3229ccfd955daf8 by Abseil Team <absl-team@google.com>:
Reformat BUILD file to current standards.
PiperOrigin-RevId: 274815392
--
a2780e085f1df1e4ca2c814a58c893d1b78a1d9c by Samuel Benzaquen <sbenza@google.com>:
Fix invalid result regarding leading zeros in the exponent.
PiperOrigin-RevId: 274808017
--
dd402e1cb5c4ebacb576372ae24bf289d729d323 by Samuel Benzaquen <sbenza@google.com>:
Make string_view's relational operators constexpr when possible.
PiperOrigin-RevId: 274807873
--
b4ef32565653a5da1cb8bb8d0351586d23519658 by Abseil Team <absl-team@google.com>:
Internal rework.
PiperOrigin-RevId: 274787159
--
70d81971c5914e6785b8e8a9d4f6eb2655dd62c0 by Gennadiy Rozental <rogeeff@google.com>:
Internal rework.
PiperOrigin-RevId: 274715557
--
14f5b0440e353b899cafaaa15b53e77f98f401af by Gennadiy Rozental <rogeeff@google.com>:
Make deprecated statements about ParseFLag/UnparseFlag consistent in a file.
PiperOrigin-RevId: 274668123
--
2e85adbdbb92612e4d750bc34fbca3333128b42d by Abseil Team <absl-team@google.com>:
Allow absl::c_equal to be used with arrays.
This is achieved by allowing container size computation for arrays.
PiperOrigin-RevId: 274426830
--
219719f107226d328773e6cec99fb473f5d3119c by Gennadiy Rozental <rogeeff@google.com>:
Release correct extension interfaces to support usage of absl::Time and absl::Duration as ABSL_FLAG
PiperOrigin-RevId: 274273788
--
47a77f93fda23b69b4a6bdbd506fe643c69a5579 by Gennadiy Rozental <rogeeff@google.com>:
Rework of flags persistence/FlagSaver internals.
PiperOrigin-RevId: 274225213
--
7807be3fe757c19e3b0c487298387683d4c9f5b3 by Abseil Team <absl-team@google.com>:
Switch reference to sdkddkver.h to lowercase, matching conventions used in the Windows SDK and other uses. This helps to avoid confusion on case-sensitive filesystems.
PiperOrigin-RevId: 274061877
--
561304090087a19f1d10f0475f564fe132ebf06e by Andy Getzendanner <durandal@google.com>:
Fix ABSL_WAITER_MODE detection for mingw
Import of https://github.com/abseil/abseil-cpp/pull/342
PiperOrigin-RevId: 274030071
--
9b3caac2cf202b9d440dfa1b4ffd538ac4bf715b by Derek Mauro <dmauro@google.com>:
Support using Abseil with the musl libc implementation.
Only test changes were required:
* Workaround for a bug in sigaltstack() on musl
* printf-style pointer formatting (%p) is implementation defined,
so verify StrFromat produces something compatible
* Fix detection of feenableexcept()
PiperOrigin-RevId: 274011666
--
73e8a938fc139e1cc8670d4513a445bacc855539 by Abseil Team <absl-team@google.com>:
nvcc workaround: explicitly specify the definition of node_handle::Base
PiperOrigin-RevId: 274011392
--
ab9cc6d042aca7d48e16c504ab10eab39433f4b2 by Andy Soffer <asoffer@google.com>:
Internal change
PiperOrigin-RevId: 273996318
--
e567c4979ca99c7e71821ec1523b8f5edd2c76ac by Abseil Team <absl-team@google.com>:
Introduce a type alias to work around an nvcc bug.
On the previous code, nvcc gets confused thinking that T has to be a parameter
pack, as IsDecomposable accepts one.
PiperOrigin-RevId: 273980472
--
105b6e6339b77a32f4432de05f44cd3f9c436751 by Eric Fiselier <ericwf@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 273955589
--
8feb87ff1d7e721fe094855e67c19539d5e582b7 by Abseil Team <absl-team@google.com>:
Avoid dual-exporting scheduling_mode.h
PiperOrigin-RevId: 273825112
--
fbc37854776d295dae98fb9d06a541f296daab95 by Andy Getzendanner <durandal@google.com>:
Fix ABSL_HAVE_ALARM check on mingw
Import of https://github.com/abseil/abseil-cpp/pull/341
PiperOrigin-RevId: 273817839
--
6aedcd63a735b9133e143b043744ba0a25407f6f by Andy Soffer <asoffer@google.com>:
Remove bit_gen_view.h now that all callers have been migrated to bit_gen_ref.h
Tested:
TGP - https://test.corp.google.com/ui#id=OCL:273762409:BASE:273743370:1570639020744:3001bcb5
PiperOrigin-RevId: 273810331
--
6573de24a66ba715c579f7f32b5c48a1d743c7f8 by Abseil Team <absl-team@google.com>:
Internal change.
PiperOrigin-RevId: 273589963
--
91c8c28b6dca26d98b39e8e06a8ed17c701ff793 by Abseil Team <absl-team@google.com>:
Update macro name for `ABSL_GUARDED_BY()` in the example section.
PiperOrigin-RevId: 273286983
--
0ff7d1a93d70f8ecd693f8dbb98b7a4a016ca2a4 by Abseil Team <absl-team@google.com>:
Fix potential integer overflow in the absl time library.
In absl::FromTM, the tm.tm_year is added by 1900 regarding that tm.tm_year represents the years since 1900. This change checks integer overflow before doing the arithmetic operation.
PiperOrigin-RevId: 273092952
--
b41c2a1310086807be09a833099ae6d4009f037c by Gennadiy Rozental <rogeeff@google.com>:
Correctly Unlock the global mutex in case of concurrent flag initialization.
Fixes #386
PiperOrigin-RevId: 272979749
--
c53103e71b2a6063af3c6d4ff68aa2d8f9ae9e06 by Abseil Team <absl-team@google.com>:
Try to become idle only when there is no wakeup.
Immediately after waking up (when futex wait returns), the current thread tries
to become idle doing bunch of memory loads and a branch. Problem is that there
is a good chance that we woke up due to a wakeup, especially for actively used
threads. For such wakeups, calling MaybeBecomeIdle() would be a waste of
cycles.
Instead, call MaybeBecomeIdle() only when we are sure there is no wakeup. For
idle threads the net effect should be the same. For active, threads this will
be more efficient.
Moreover, since MaybeBecomeIdle() is called before waiting on the futex, the
current thread will try to become idle before sleeping. This should result
in more accurate idleness and more efficient release of thread resources.
PiperOrigin-RevId: 272940381
GitOrigin-RevId: f13697e3d33803f9667d124072da4f6dd8bfbf85
Change-Id: I36de05aec12595183725652dd362dfa58fb095d0
2019-10-16 03:18:40 +02:00
|
|
|
hdrs = ["internal/spinlock_wait.h"],
|
2017-09-19 22:54:40 +02:00
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-10-13 19:21:40 +02:00
|
|
|
visibility = [
|
|
|
|
"//absl/base:__pkg__",
|
|
|
|
],
|
Export of internal Abseil changes
--
f13697e3d33803f9667d124072da4f6dd8bfbf85 by Andy Soffer <asoffer@google.com>:
Addressing https://github.com/abseil/abseil-cpp/issues/314, fixing
CMakeLists.txt to reference ABSL_TEST_COPTS rather than ABSL_DEFAULT_COPTS.
ABSL_TEST_COPTS should be preferred for all tests so that they are configured consistently (moreover, CMake should agree with Bazel).
PiperOrigin-RevId: 274932312
--
c31c24a1fa6bb98136adf51ef37c0818ac366690 by Derek Mauro <dmauro@google.com>:
Silence MSAN in the stack consumption test utility
PiperOrigin-RevId: 274912950
--
2412913c05a246cd527cd4c31452f126e9129f3a by CJ Johnson <johnsoncj@google.com>:
Internal change
PiperOrigin-RevId: 274847103
--
75e984a93b5760873501b96ac3229ccfd955daf8 by Abseil Team <absl-team@google.com>:
Reformat BUILD file to current standards.
PiperOrigin-RevId: 274815392
--
a2780e085f1df1e4ca2c814a58c893d1b78a1d9c by Samuel Benzaquen <sbenza@google.com>:
Fix invalid result regarding leading zeros in the exponent.
PiperOrigin-RevId: 274808017
--
dd402e1cb5c4ebacb576372ae24bf289d729d323 by Samuel Benzaquen <sbenza@google.com>:
Make string_view's relational operators constexpr when possible.
PiperOrigin-RevId: 274807873
--
b4ef32565653a5da1cb8bb8d0351586d23519658 by Abseil Team <absl-team@google.com>:
Internal rework.
PiperOrigin-RevId: 274787159
--
70d81971c5914e6785b8e8a9d4f6eb2655dd62c0 by Gennadiy Rozental <rogeeff@google.com>:
Internal rework.
PiperOrigin-RevId: 274715557
--
14f5b0440e353b899cafaaa15b53e77f98f401af by Gennadiy Rozental <rogeeff@google.com>:
Make deprecated statements about ParseFLag/UnparseFlag consistent in a file.
PiperOrigin-RevId: 274668123
--
2e85adbdbb92612e4d750bc34fbca3333128b42d by Abseil Team <absl-team@google.com>:
Allow absl::c_equal to be used with arrays.
This is achieved by allowing container size computation for arrays.
PiperOrigin-RevId: 274426830
--
219719f107226d328773e6cec99fb473f5d3119c by Gennadiy Rozental <rogeeff@google.com>:
Release correct extension interfaces to support usage of absl::Time and absl::Duration as ABSL_FLAG
PiperOrigin-RevId: 274273788
--
47a77f93fda23b69b4a6bdbd506fe643c69a5579 by Gennadiy Rozental <rogeeff@google.com>:
Rework of flags persistence/FlagSaver internals.
PiperOrigin-RevId: 274225213
--
7807be3fe757c19e3b0c487298387683d4c9f5b3 by Abseil Team <absl-team@google.com>:
Switch reference to sdkddkver.h to lowercase, matching conventions used in the Windows SDK and other uses. This helps to avoid confusion on case-sensitive filesystems.
PiperOrigin-RevId: 274061877
--
561304090087a19f1d10f0475f564fe132ebf06e by Andy Getzendanner <durandal@google.com>:
Fix ABSL_WAITER_MODE detection for mingw
Import of https://github.com/abseil/abseil-cpp/pull/342
PiperOrigin-RevId: 274030071
--
9b3caac2cf202b9d440dfa1b4ffd538ac4bf715b by Derek Mauro <dmauro@google.com>:
Support using Abseil with the musl libc implementation.
Only test changes were required:
* Workaround for a bug in sigaltstack() on musl
* printf-style pointer formatting (%p) is implementation defined,
so verify StrFromat produces something compatible
* Fix detection of feenableexcept()
PiperOrigin-RevId: 274011666
--
73e8a938fc139e1cc8670d4513a445bacc855539 by Abseil Team <absl-team@google.com>:
nvcc workaround: explicitly specify the definition of node_handle::Base
PiperOrigin-RevId: 274011392
--
ab9cc6d042aca7d48e16c504ab10eab39433f4b2 by Andy Soffer <asoffer@google.com>:
Internal change
PiperOrigin-RevId: 273996318
--
e567c4979ca99c7e71821ec1523b8f5edd2c76ac by Abseil Team <absl-team@google.com>:
Introduce a type alias to work around an nvcc bug.
On the previous code, nvcc gets confused thinking that T has to be a parameter
pack, as IsDecomposable accepts one.
PiperOrigin-RevId: 273980472
--
105b6e6339b77a32f4432de05f44cd3f9c436751 by Eric Fiselier <ericwf@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 273955589
--
8feb87ff1d7e721fe094855e67c19539d5e582b7 by Abseil Team <absl-team@google.com>:
Avoid dual-exporting scheduling_mode.h
PiperOrigin-RevId: 273825112
--
fbc37854776d295dae98fb9d06a541f296daab95 by Andy Getzendanner <durandal@google.com>:
Fix ABSL_HAVE_ALARM check on mingw
Import of https://github.com/abseil/abseil-cpp/pull/341
PiperOrigin-RevId: 273817839
--
6aedcd63a735b9133e143b043744ba0a25407f6f by Andy Soffer <asoffer@google.com>:
Remove bit_gen_view.h now that all callers have been migrated to bit_gen_ref.h
Tested:
TGP - https://test.corp.google.com/ui#id=OCL:273762409:BASE:273743370:1570639020744:3001bcb5
PiperOrigin-RevId: 273810331
--
6573de24a66ba715c579f7f32b5c48a1d743c7f8 by Abseil Team <absl-team@google.com>:
Internal change.
PiperOrigin-RevId: 273589963
--
91c8c28b6dca26d98b39e8e06a8ed17c701ff793 by Abseil Team <absl-team@google.com>:
Update macro name for `ABSL_GUARDED_BY()` in the example section.
PiperOrigin-RevId: 273286983
--
0ff7d1a93d70f8ecd693f8dbb98b7a4a016ca2a4 by Abseil Team <absl-team@google.com>:
Fix potential integer overflow in the absl time library.
In absl::FromTM, the tm.tm_year is added by 1900 regarding that tm.tm_year represents the years since 1900. This change checks integer overflow before doing the arithmetic operation.
PiperOrigin-RevId: 273092952
--
b41c2a1310086807be09a833099ae6d4009f037c by Gennadiy Rozental <rogeeff@google.com>:
Correctly Unlock the global mutex in case of concurrent flag initialization.
Fixes #386
PiperOrigin-RevId: 272979749
--
c53103e71b2a6063af3c6d4ff68aa2d8f9ae9e06 by Abseil Team <absl-team@google.com>:
Try to become idle only when there is no wakeup.
Immediately after waking up (when futex wait returns), the current thread tries
to become idle doing bunch of memory loads and a branch. Problem is that there
is a good chance that we woke up due to a wakeup, especially for actively used
threads. For such wakeups, calling MaybeBecomeIdle() would be a waste of
cycles.
Instead, call MaybeBecomeIdle() only when we are sure there is no wakeup. For
idle threads the net effect should be the same. For active, threads this will
be more efficient.
Moreover, since MaybeBecomeIdle() is called before waiting on the futex, the
current thread will try to become idle before sleeping. This should result
in more accurate idleness and more efficient release of thread resources.
PiperOrigin-RevId: 272940381
GitOrigin-RevId: f13697e3d33803f9667d124072da4f6dd8bfbf85
Change-Id: I36de05aec12595183725652dd362dfa58fb095d0
2019-10-16 03:18:40 +02:00
|
|
|
deps = [
|
|
|
|
":base_internal",
|
|
|
|
":core_headers",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "config",
|
|
|
|
hdrs = [
|
|
|
|
"config.h",
|
Export of internal Abseil changes
--
2f49cb9009386bc67bf54a2908c8720b749c8b7f by Greg Falcon <gfalcon@google.com>:
docs: fix typo
Import of https://github.com/abseil/abseil-cpp/pull/397
PiperOrigin-RevId: 277504420
--
f2bed362c1c12d3fa9c22d11f2b918668e8c37b7 by Abseil Team <absl-team@google.com>:
Avoid our is_[copy/move]_assignable workarounds in MSVC 19.20 and on, since that release introduces a regression that breaks our workaround. We should ideally use the std forms in more cases, but branching when our workarounds fail is simpler to maintain.
PiperOrigin-RevId: 277502334
--
e33de894ffd49848b9e088f59acc9743d1661948 by Derek Mauro <dmauro@google.com>:
Update rules_cc version. The mirror.bazel.build URL does not exist
(cache expiration?)
PiperOrigin-RevId: 277498394
--
b23757b0747c64634d2d701433782c969effef19 by Abseil Team <absl-team@google.com>:
Fix https://github.com/abseil/abseil-cpp/issues/394.
PiperOrigin-RevId: 277491405
--
54c75b8b29813531c52d67cf0ba7063baae4a4f3 by Abseil Team <absl-team@google.com>:
Fix comment typos: waker => waiter.
PiperOrigin-RevId: 277376952
--
874eeaa3b3af808fc88b6355245f643674f5e36e by Abseil Team <absl-team@google.com>:
Don't use atomic ops on waiter and wakeup counts in CONDVAR waiter mode.
Just guard the waiter and wakeup counts with the mutex. This eliminates the
race.
Also fix a typo in the error message for pthread_cond_timedwait.
PiperOrigin-RevId: 277366017
--
ce8c9a63109214519b5a7eaecef2c663c4d566df by Greg Falcon <gfalcon@google.com>:
Implement the config options for our four main C++ forward compatibility types.
These options control whether the names `any`, `optional`, `string_view`, and `variant` in namespace `absl` are aliases to the corresponding C++17 types in namespace `std`. By default, we continue to auto-detect the configuration of the compiler being run.
These options are not intended to be modified on the command line (as -D flags, say). Instead, the options.h file can be modified by distributors of Abseil (e.g., binary packagers, maintainers of local copies of Abseil, etc.)
Changing options will change Abseil in an ODR sense. Any program must only link in a single version of Abseil. Linking libraries that use Abseil configured with different options is an error: there is no ABI compatibility guarantee when linking different configurations, even if the Abseil versions used are otherwise exactly identical.
PiperOrigin-RevId: 277364298
--
5ed3ad42ae43a05862070f92f9ffd07f5c1f2b81 by Chris Kennelly <ckennelly@google.com>:
Suppress -Wimplicit-int-float-conversion.
On recent builds of Clang, this is an error/warning.
PiperOrigin-RevId: 277346168
--
9b9b0055243c705189bb27d912e6d45a7789cdee by Eric Fiselier <ericwf@google.com>:
Allow building Abseil as a shared library with CMake.
By default CMake's `add_library` creates the target as a static
library. However, users can override the default using the builtin
CMake option -DBUILD_SHARED_LIBS=ON.
This changes Abseil's CMake to respect this configuration option
by removing the explicit `STATIC` in our usages of `add_library`.
PiperOrigin-RevId: 277337753
--
63a8b7b8ede3a9d851916929d6b8537f4f2508ca by Abseil Team <absl-team@google.com>:
Improve AlphaNum Hex performance by using absl::numbers_internal::FastHexToBufferZeroPad16.
PiperOrigin-RevId: 277318108
--
dd047f7e92032682d94b27732df0e4d0670e24a4 by CJ Johnson <johnsoncj@google.com>:
Internal change
PiperOrigin-RevId: 277316913
--
d19ee7074929fed08973cc5b40a844573ce1e0a6 by Abseil Team <absl-team@google.com>:
Handle invoking [[nodiscard]] functions correctly in our tests.
PiperOrigin-RevId: 277301500
--
5373f3737894ba9b8481e95e5f58c7957c00d26a by Chris Kennelly <ckennelly@google.com>:
For internal reasons, loosen visibility restrictions of `//absl/base:malloc_internal`.
As an internal-namespace interface, this module remains unsupported. We
reserve the right to change, delete, or re-restrict visibility to this target
at any time.
PiperOrigin-RevId: 277118689
--
44e4f6655e05393a375d09b3625c192b1fde5909 by Abseil Team <absl-team@google.com>:
Fix error in example civil day comment.
PiperOrigin-RevId: 277103315
--
7657392b4ce48469106f11cdb952a0bc76a28df3 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 277056076
--
c75bda76f40b01fa249b75b5a70c1f5907e56c76 by Abseil Team <absl-team@google.com>:
Suppress lifetime constant-initialization tests when building with MSVC versions > 19.0.
These are broken due to non-compliant initialization order in these versions:
https://developercommunity.visualstudio.com/content/problem/336946/class-with-constexpr-constructor-not-using-static.html
We don't know when Microsoft will fix this bug.
PiperOrigin-RevId: 277049770
--
16c3b9bf2a1796efa57f97b00bcd6227fbccca1f by Matt Calabrese <calabrese@google.com>:
Avoid our is_[copy/move]_assignable workarounds in MSVC 19.20 and on, since that release introduces a regression that breaks our workaround. We should ideally use the std forms in more cases, but branching when our workarounds fail is simpler to maintain.
PiperOrigin-RevId: 277048670
--
e91003fa3ee6026d9b80624a23fc144fa5d74810 by Chris Kennelly <ckennelly@google.com>:
Fix -Wimplicit-int-float-conversion warning in latest clang
PiperOrigin-RevId: 276771618
--
53087ca6603e86ad815f3dd9ab795cc0f79792c1 by Andy Soffer <asoffer@google.com>:
Add documentation on absl::SNPrintF.
PiperOrigin-RevId: 276694032
--
a9426af8cbd4c3a8f9053e7446c821852e41ff61 by Jorg Brown <jorg@google.com>:
Stop including kern/OSByteOrder.h in order to support __APPLE__
Apple compiles with clang now anyway, and clang has support for the
built-in compiler swap functions that are much faster than any function call to
the OS.
PiperOrigin-RevId: 276625231
--
df974be5aa5b4dc1b09c356cb8816edfc7867e63 by Jorg Brown <jorg@google.com>:
Fix the build for Android x86-64 builds, where __SSE4_2__ is defined but
_bswap64 is not.
PiperOrigin-RevId: 276542642
--
d99dc092b3a5ad17643005e55f3b3cb6b9187ccc by Jorg Brown <jorg@google.com>:
Remove a byteswap from the non-SSE path of FastHexToBufferZeroPad16
Remove the need for including absl/base/internal/endian.h from the SSE case
(since if we have the Intel SSE intrinsics, then clearly we also have the
Intel Byte-Swap intrinsics.)
PiperOrigin-RevId: 276532608
--
d67b106dc930d8558810ae3983613bb2ab1e0d36 by Abseil Team <absl-team@google.com>:
Use explicit static_cast<double> for int64_t to double conversion
This uses an explicit static_cast<double>() in the int64_t to double comparisons in duration.cc's SafeAddRepHi. This satisfies clang's -Wimplicit-int-to-float-conversion warning (with https://reviews.llvm.org/D64666). This may also make it easier for humans to realize that the comparison is happening between two floating point double precision values. It should have no impact on the behavior or generated code.
Tested:
No behavior change
PiperOrigin-RevId: 276529211
GitOrigin-RevId: 2f49cb9009386bc67bf54a2908c8720b749c8b7f
Change-Id: I71e0781893ce219960b8290d54b20532779cb0ff
2019-10-30 16:00:44 +01:00
|
|
|
"options.h",
|
2017-09-19 22:54:40 +02:00
|
|
|
"policy_checks.h",
|
|
|
|
],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "dynamic_annotations",
|
|
|
|
srcs = ["dynamic_annotations.cc"],
|
|
|
|
hdrs = ["dynamic_annotations.h"],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
|
|
|
defines = ["__CLANG_SUPPORT_DYN_ANNOTATION__"],
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "core_headers",
|
2019-05-30 17:42:34 +02:00
|
|
|
srcs = [
|
|
|
|
"internal/thread_annotations.h",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
hdrs = [
|
|
|
|
"attributes.h",
|
2018-12-13 19:30:03 +01:00
|
|
|
"const_init.h",
|
2017-09-19 22:54:40 +02:00
|
|
|
"macros.h",
|
|
|
|
"optimization.h",
|
|
|
|
"port.h",
|
|
|
|
"thread_annotations.h",
|
|
|
|
],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":config",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "malloc_internal",
|
|
|
|
srcs = [
|
|
|
|
"internal/low_level_alloc.cc",
|
|
|
|
],
|
|
|
|
hdrs = [
|
2018-04-11 18:52:42 +02:00
|
|
|
"internal/direct_mmap.h",
|
2017-09-19 22:54:40 +02:00
|
|
|
"internal/low_level_alloc.h",
|
|
|
|
],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
2019-01-07 18:01:16 +01:00
|
|
|
linkopts = select({
|
|
|
|
"//absl:windows": [],
|
|
|
|
"//conditions:default": ["-pthread"],
|
2019-03-27 16:05:41 +01:00
|
|
|
}) + ABSL_DEFAULT_LINKOPTS,
|
2017-10-13 19:21:40 +02:00
|
|
|
visibility = [
|
Export of internal Abseil changes
--
2f49cb9009386bc67bf54a2908c8720b749c8b7f by Greg Falcon <gfalcon@google.com>:
docs: fix typo
Import of https://github.com/abseil/abseil-cpp/pull/397
PiperOrigin-RevId: 277504420
--
f2bed362c1c12d3fa9c22d11f2b918668e8c37b7 by Abseil Team <absl-team@google.com>:
Avoid our is_[copy/move]_assignable workarounds in MSVC 19.20 and on, since that release introduces a regression that breaks our workaround. We should ideally use the std forms in more cases, but branching when our workarounds fail is simpler to maintain.
PiperOrigin-RevId: 277502334
--
e33de894ffd49848b9e088f59acc9743d1661948 by Derek Mauro <dmauro@google.com>:
Update rules_cc version. The mirror.bazel.build URL does not exist
(cache expiration?)
PiperOrigin-RevId: 277498394
--
b23757b0747c64634d2d701433782c969effef19 by Abseil Team <absl-team@google.com>:
Fix https://github.com/abseil/abseil-cpp/issues/394.
PiperOrigin-RevId: 277491405
--
54c75b8b29813531c52d67cf0ba7063baae4a4f3 by Abseil Team <absl-team@google.com>:
Fix comment typos: waker => waiter.
PiperOrigin-RevId: 277376952
--
874eeaa3b3af808fc88b6355245f643674f5e36e by Abseil Team <absl-team@google.com>:
Don't use atomic ops on waiter and wakeup counts in CONDVAR waiter mode.
Just guard the waiter and wakeup counts with the mutex. This eliminates the
race.
Also fix a typo in the error message for pthread_cond_timedwait.
PiperOrigin-RevId: 277366017
--
ce8c9a63109214519b5a7eaecef2c663c4d566df by Greg Falcon <gfalcon@google.com>:
Implement the config options for our four main C++ forward compatibility types.
These options control whether the names `any`, `optional`, `string_view`, and `variant` in namespace `absl` are aliases to the corresponding C++17 types in namespace `std`. By default, we continue to auto-detect the configuration of the compiler being run.
These options are not intended to be modified on the command line (as -D flags, say). Instead, the options.h file can be modified by distributors of Abseil (e.g., binary packagers, maintainers of local copies of Abseil, etc.)
Changing options will change Abseil in an ODR sense. Any program must only link in a single version of Abseil. Linking libraries that use Abseil configured with different options is an error: there is no ABI compatibility guarantee when linking different configurations, even if the Abseil versions used are otherwise exactly identical.
PiperOrigin-RevId: 277364298
--
5ed3ad42ae43a05862070f92f9ffd07f5c1f2b81 by Chris Kennelly <ckennelly@google.com>:
Suppress -Wimplicit-int-float-conversion.
On recent builds of Clang, this is an error/warning.
PiperOrigin-RevId: 277346168
--
9b9b0055243c705189bb27d912e6d45a7789cdee by Eric Fiselier <ericwf@google.com>:
Allow building Abseil as a shared library with CMake.
By default CMake's `add_library` creates the target as a static
library. However, users can override the default using the builtin
CMake option -DBUILD_SHARED_LIBS=ON.
This changes Abseil's CMake to respect this configuration option
by removing the explicit `STATIC` in our usages of `add_library`.
PiperOrigin-RevId: 277337753
--
63a8b7b8ede3a9d851916929d6b8537f4f2508ca by Abseil Team <absl-team@google.com>:
Improve AlphaNum Hex performance by using absl::numbers_internal::FastHexToBufferZeroPad16.
PiperOrigin-RevId: 277318108
--
dd047f7e92032682d94b27732df0e4d0670e24a4 by CJ Johnson <johnsoncj@google.com>:
Internal change
PiperOrigin-RevId: 277316913
--
d19ee7074929fed08973cc5b40a844573ce1e0a6 by Abseil Team <absl-team@google.com>:
Handle invoking [[nodiscard]] functions correctly in our tests.
PiperOrigin-RevId: 277301500
--
5373f3737894ba9b8481e95e5f58c7957c00d26a by Chris Kennelly <ckennelly@google.com>:
For internal reasons, loosen visibility restrictions of `//absl/base:malloc_internal`.
As an internal-namespace interface, this module remains unsupported. We
reserve the right to change, delete, or re-restrict visibility to this target
at any time.
PiperOrigin-RevId: 277118689
--
44e4f6655e05393a375d09b3625c192b1fde5909 by Abseil Team <absl-team@google.com>:
Fix error in example civil day comment.
PiperOrigin-RevId: 277103315
--
7657392b4ce48469106f11cdb952a0bc76a28df3 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 277056076
--
c75bda76f40b01fa249b75b5a70c1f5907e56c76 by Abseil Team <absl-team@google.com>:
Suppress lifetime constant-initialization tests when building with MSVC versions > 19.0.
These are broken due to non-compliant initialization order in these versions:
https://developercommunity.visualstudio.com/content/problem/336946/class-with-constexpr-constructor-not-using-static.html
We don't know when Microsoft will fix this bug.
PiperOrigin-RevId: 277049770
--
16c3b9bf2a1796efa57f97b00bcd6227fbccca1f by Matt Calabrese <calabrese@google.com>:
Avoid our is_[copy/move]_assignable workarounds in MSVC 19.20 and on, since that release introduces a regression that breaks our workaround. We should ideally use the std forms in more cases, but branching when our workarounds fail is simpler to maintain.
PiperOrigin-RevId: 277048670
--
e91003fa3ee6026d9b80624a23fc144fa5d74810 by Chris Kennelly <ckennelly@google.com>:
Fix -Wimplicit-int-float-conversion warning in latest clang
PiperOrigin-RevId: 276771618
--
53087ca6603e86ad815f3dd9ab795cc0f79792c1 by Andy Soffer <asoffer@google.com>:
Add documentation on absl::SNPrintF.
PiperOrigin-RevId: 276694032
--
a9426af8cbd4c3a8f9053e7446c821852e41ff61 by Jorg Brown <jorg@google.com>:
Stop including kern/OSByteOrder.h in order to support __APPLE__
Apple compiles with clang now anyway, and clang has support for the
built-in compiler swap functions that are much faster than any function call to
the OS.
PiperOrigin-RevId: 276625231
--
df974be5aa5b4dc1b09c356cb8816edfc7867e63 by Jorg Brown <jorg@google.com>:
Fix the build for Android x86-64 builds, where __SSE4_2__ is defined but
_bswap64 is not.
PiperOrigin-RevId: 276542642
--
d99dc092b3a5ad17643005e55f3b3cb6b9187ccc by Jorg Brown <jorg@google.com>:
Remove a byteswap from the non-SSE path of FastHexToBufferZeroPad16
Remove the need for including absl/base/internal/endian.h from the SSE case
(since if we have the Intel SSE intrinsics, then clearly we also have the
Intel Byte-Swap intrinsics.)
PiperOrigin-RevId: 276532608
--
d67b106dc930d8558810ae3983613bb2ab1e0d36 by Abseil Team <absl-team@google.com>:
Use explicit static_cast<double> for int64_t to double conversion
This uses an explicit static_cast<double>() in the int64_t to double comparisons in duration.cc's SafeAddRepHi. This satisfies clang's -Wimplicit-int-to-float-conversion warning (with https://reviews.llvm.org/D64666). This may also make it easier for humans to realize that the comparison is happening between two floating point double precision values. It should have no impact on the behavior or generated code.
Tested:
No behavior change
PiperOrigin-RevId: 276529211
GitOrigin-RevId: 2f49cb9009386bc67bf54a2908c8720b749c8b7f
Change-Id: I71e0781893ce219960b8290d54b20532779cb0ff
2019-10-30 16:00:44 +01:00
|
|
|
"//visibility:public",
|
2017-10-13 19:21:40 +02:00
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":base",
|
Export of internal Abseil changes
--
f13697e3d33803f9667d124072da4f6dd8bfbf85 by Andy Soffer <asoffer@google.com>:
Addressing https://github.com/abseil/abseil-cpp/issues/314, fixing
CMakeLists.txt to reference ABSL_TEST_COPTS rather than ABSL_DEFAULT_COPTS.
ABSL_TEST_COPTS should be preferred for all tests so that they are configured consistently (moreover, CMake should agree with Bazel).
PiperOrigin-RevId: 274932312
--
c31c24a1fa6bb98136adf51ef37c0818ac366690 by Derek Mauro <dmauro@google.com>:
Silence MSAN in the stack consumption test utility
PiperOrigin-RevId: 274912950
--
2412913c05a246cd527cd4c31452f126e9129f3a by CJ Johnson <johnsoncj@google.com>:
Internal change
PiperOrigin-RevId: 274847103
--
75e984a93b5760873501b96ac3229ccfd955daf8 by Abseil Team <absl-team@google.com>:
Reformat BUILD file to current standards.
PiperOrigin-RevId: 274815392
--
a2780e085f1df1e4ca2c814a58c893d1b78a1d9c by Samuel Benzaquen <sbenza@google.com>:
Fix invalid result regarding leading zeros in the exponent.
PiperOrigin-RevId: 274808017
--
dd402e1cb5c4ebacb576372ae24bf289d729d323 by Samuel Benzaquen <sbenza@google.com>:
Make string_view's relational operators constexpr when possible.
PiperOrigin-RevId: 274807873
--
b4ef32565653a5da1cb8bb8d0351586d23519658 by Abseil Team <absl-team@google.com>:
Internal rework.
PiperOrigin-RevId: 274787159
--
70d81971c5914e6785b8e8a9d4f6eb2655dd62c0 by Gennadiy Rozental <rogeeff@google.com>:
Internal rework.
PiperOrigin-RevId: 274715557
--
14f5b0440e353b899cafaaa15b53e77f98f401af by Gennadiy Rozental <rogeeff@google.com>:
Make deprecated statements about ParseFLag/UnparseFlag consistent in a file.
PiperOrigin-RevId: 274668123
--
2e85adbdbb92612e4d750bc34fbca3333128b42d by Abseil Team <absl-team@google.com>:
Allow absl::c_equal to be used with arrays.
This is achieved by allowing container size computation for arrays.
PiperOrigin-RevId: 274426830
--
219719f107226d328773e6cec99fb473f5d3119c by Gennadiy Rozental <rogeeff@google.com>:
Release correct extension interfaces to support usage of absl::Time and absl::Duration as ABSL_FLAG
PiperOrigin-RevId: 274273788
--
47a77f93fda23b69b4a6bdbd506fe643c69a5579 by Gennadiy Rozental <rogeeff@google.com>:
Rework of flags persistence/FlagSaver internals.
PiperOrigin-RevId: 274225213
--
7807be3fe757c19e3b0c487298387683d4c9f5b3 by Abseil Team <absl-team@google.com>:
Switch reference to sdkddkver.h to lowercase, matching conventions used in the Windows SDK and other uses. This helps to avoid confusion on case-sensitive filesystems.
PiperOrigin-RevId: 274061877
--
561304090087a19f1d10f0475f564fe132ebf06e by Andy Getzendanner <durandal@google.com>:
Fix ABSL_WAITER_MODE detection for mingw
Import of https://github.com/abseil/abseil-cpp/pull/342
PiperOrigin-RevId: 274030071
--
9b3caac2cf202b9d440dfa1b4ffd538ac4bf715b by Derek Mauro <dmauro@google.com>:
Support using Abseil with the musl libc implementation.
Only test changes were required:
* Workaround for a bug in sigaltstack() on musl
* printf-style pointer formatting (%p) is implementation defined,
so verify StrFromat produces something compatible
* Fix detection of feenableexcept()
PiperOrigin-RevId: 274011666
--
73e8a938fc139e1cc8670d4513a445bacc855539 by Abseil Team <absl-team@google.com>:
nvcc workaround: explicitly specify the definition of node_handle::Base
PiperOrigin-RevId: 274011392
--
ab9cc6d042aca7d48e16c504ab10eab39433f4b2 by Andy Soffer <asoffer@google.com>:
Internal change
PiperOrigin-RevId: 273996318
--
e567c4979ca99c7e71821ec1523b8f5edd2c76ac by Abseil Team <absl-team@google.com>:
Introduce a type alias to work around an nvcc bug.
On the previous code, nvcc gets confused thinking that T has to be a parameter
pack, as IsDecomposable accepts one.
PiperOrigin-RevId: 273980472
--
105b6e6339b77a32f4432de05f44cd3f9c436751 by Eric Fiselier <ericwf@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 273955589
--
8feb87ff1d7e721fe094855e67c19539d5e582b7 by Abseil Team <absl-team@google.com>:
Avoid dual-exporting scheduling_mode.h
PiperOrigin-RevId: 273825112
--
fbc37854776d295dae98fb9d06a541f296daab95 by Andy Getzendanner <durandal@google.com>:
Fix ABSL_HAVE_ALARM check on mingw
Import of https://github.com/abseil/abseil-cpp/pull/341
PiperOrigin-RevId: 273817839
--
6aedcd63a735b9133e143b043744ba0a25407f6f by Andy Soffer <asoffer@google.com>:
Remove bit_gen_view.h now that all callers have been migrated to bit_gen_ref.h
Tested:
TGP - https://test.corp.google.com/ui#id=OCL:273762409:BASE:273743370:1570639020744:3001bcb5
PiperOrigin-RevId: 273810331
--
6573de24a66ba715c579f7f32b5c48a1d743c7f8 by Abseil Team <absl-team@google.com>:
Internal change.
PiperOrigin-RevId: 273589963
--
91c8c28b6dca26d98b39e8e06a8ed17c701ff793 by Abseil Team <absl-team@google.com>:
Update macro name for `ABSL_GUARDED_BY()` in the example section.
PiperOrigin-RevId: 273286983
--
0ff7d1a93d70f8ecd693f8dbb98b7a4a016ca2a4 by Abseil Team <absl-team@google.com>:
Fix potential integer overflow in the absl time library.
In absl::FromTM, the tm.tm_year is added by 1900 regarding that tm.tm_year represents the years since 1900. This change checks integer overflow before doing the arithmetic operation.
PiperOrigin-RevId: 273092952
--
b41c2a1310086807be09a833099ae6d4009f037c by Gennadiy Rozental <rogeeff@google.com>:
Correctly Unlock the global mutex in case of concurrent flag initialization.
Fixes #386
PiperOrigin-RevId: 272979749
--
c53103e71b2a6063af3c6d4ff68aa2d8f9ae9e06 by Abseil Team <absl-team@google.com>:
Try to become idle only when there is no wakeup.
Immediately after waking up (when futex wait returns), the current thread tries
to become idle doing bunch of memory loads and a branch. Problem is that there
is a good chance that we woke up due to a wakeup, especially for actively used
threads. For such wakeups, calling MaybeBecomeIdle() would be a waste of
cycles.
Instead, call MaybeBecomeIdle() only when we are sure there is no wakeup. For
idle threads the net effect should be the same. For active, threads this will
be more efficient.
Moreover, since MaybeBecomeIdle() is called before waiting on the futex, the
current thread will try to become idle before sleeping. This should result
in more accurate idleness and more efficient release of thread resources.
PiperOrigin-RevId: 272940381
GitOrigin-RevId: f13697e3d33803f9667d124072da4f6dd8bfbf85
Change-Id: I36de05aec12595183725652dd362dfa58fb095d0
2019-10-16 03:18:40 +02:00
|
|
|
":base_internal",
|
2017-09-19 22:54:40 +02:00
|
|
|
":config",
|
|
|
|
":core_headers",
|
|
|
|
":dynamic_annotations",
|
2019-08-13 19:20:16 +02:00
|
|
|
":raw_logging_internal",
|
2017-09-19 22:54:40 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "base_internal",
|
|
|
|
hdrs = [
|
2018-05-23 01:34:47 +02:00
|
|
|
"internal/hide_ptr.h",
|
2017-09-19 22:54:40 +02:00
|
|
|
"internal/identity.h",
|
2018-01-24 20:58:42 +01:00
|
|
|
"internal/inline_variable.h",
|
2017-09-19 22:54:40 +02:00
|
|
|
"internal/invoke.h",
|
2018-12-04 20:01:12 +01:00
|
|
|
"internal/scheduling_mode.h",
|
2017-09-19 22:54:40 +02:00
|
|
|
],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-10-13 19:21:40 +02:00
|
|
|
visibility = [
|
|
|
|
"//absl:__subpackages__",
|
|
|
|
],
|
2019-08-05 20:32:04 +02:00
|
|
|
deps = [
|
2019-12-10 18:03:32 +01:00
|
|
|
":config",
|
2019-08-05 20:32:04 +02:00
|
|
|
"//absl/meta:type_traits",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "base",
|
|
|
|
srcs = [
|
|
|
|
"internal/cycleclock.cc",
|
|
|
|
"internal/spinlock.cc",
|
|
|
|
"internal/sysinfo.cc",
|
|
|
|
"internal/thread_identity.cc",
|
|
|
|
"internal/unscaledcycleclock.cc",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"call_once.h",
|
|
|
|
"casts.h",
|
|
|
|
"internal/cycleclock.h",
|
|
|
|
"internal/low_level_scheduling.h",
|
|
|
|
"internal/per_thread_tls.h",
|
|
|
|
"internal/spinlock.h",
|
|
|
|
"internal/sysinfo.h",
|
|
|
|
"internal/thread_identity.h",
|
|
|
|
"internal/tsan_mutex_interface.h",
|
|
|
|
"internal/unscaledcycleclock.h",
|
|
|
|
],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
2019-01-07 18:01:16 +01:00
|
|
|
linkopts = select({
|
2019-11-13 17:54:32 +01:00
|
|
|
"//absl:windows": [
|
2019-12-02 19:41:53 +01:00
|
|
|
"-DEFAULTLIB:advapi32.lib",
|
2019-11-13 17:54:32 +01:00
|
|
|
],
|
2019-01-07 18:01:16 +01:00
|
|
|
"//conditions:default": ["-pthread"],
|
2019-03-27 16:05:41 +01:00
|
|
|
}) + ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
2019-07-18 18:04:43 +02:00
|
|
|
":atomic_hook",
|
2017-09-19 22:54:40 +02:00
|
|
|
":base_internal",
|
|
|
|
":config",
|
|
|
|
":core_headers",
|
|
|
|
":dynamic_annotations",
|
2019-07-18 18:04:43 +02:00
|
|
|
":log_severity",
|
2019-08-13 19:20:16 +02:00
|
|
|
":raw_logging_internal",
|
2017-09-19 22:54:40 +02:00
|
|
|
":spinlock_wait",
|
2019-04-12 09:26:40 +02:00
|
|
|
"//absl/meta:type_traits",
|
2017-09-19 22:54:40 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-10-03 00:20:57 +02:00
|
|
|
cc_library(
|
|
|
|
name = "atomic_hook_test_helper",
|
|
|
|
testonly = 1,
|
|
|
|
srcs = ["internal/atomic_hook_test_helper.cc"],
|
|
|
|
hdrs = ["internal/atomic_hook_test_helper.h"],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
deps = [
|
|
|
|
":atomic_hook",
|
|
|
|
":core_headers",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2018-05-04 18:58:56 +02:00
|
|
|
cc_test(
|
|
|
|
name = "atomic_hook_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["internal/atomic_hook_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2018-05-04 18:58:56 +02:00
|
|
|
deps = [
|
2019-07-18 18:04:43 +02:00
|
|
|
":atomic_hook",
|
2019-10-03 00:20:57 +02:00
|
|
|
":atomic_hook_test_helper",
|
2018-05-04 18:58:56 +02:00
|
|
|
":core_headers",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2017-09-19 22:54:40 +02:00
|
|
|
cc_test(
|
|
|
|
name = "bit_cast_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = [
|
|
|
|
"bit_cast_test.cc",
|
|
|
|
],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":base",
|
|
|
|
":core_headers",
|
2017-09-26 00:35:12 +02:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "throw_delegate",
|
|
|
|
srcs = ["internal/throw_delegate.cc"],
|
|
|
|
hdrs = ["internal/throw_delegate.h"],
|
2019-08-30 21:03:24 +02:00
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-10-13 19:21:40 +02:00
|
|
|
visibility = [
|
|
|
|
"//absl:__subpackages__",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":config",
|
2019-08-13 19:20:16 +02:00
|
|
|
":raw_logging_internal",
|
2017-09-19 22:54:40 +02:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "throw_delegate_test",
|
|
|
|
srcs = ["throw_delegate_test.cc"],
|
2019-08-30 21:03:24 +02:00
|
|
|
copts = ABSL_TEST_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
2019-08-30 21:03:24 +02:00
|
|
|
":config",
|
2017-09-19 22:54:40 +02:00
|
|
|
":throw_delegate",
|
2017-09-26 00:35:12 +02:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "exception_testing",
|
|
|
|
testonly = 1,
|
|
|
|
hdrs = ["internal/exception_testing.h"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2018-03-30 22:35:58 +02:00
|
|
|
visibility = [
|
|
|
|
"//absl:__subpackages__",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":config",
|
|
|
|
"@com_google_googletest//:gtest",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2017-10-30 23:55:37 +01:00
|
|
|
cc_library(
|
|
|
|
name = "pretty_function",
|
|
|
|
hdrs = ["internal/pretty_function.h"],
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-11-14 01:26:03 +01:00
|
|
|
visibility = ["//absl:__subpackages__"],
|
2017-10-30 23:55:37 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "exception_safety_testing",
|
|
|
|
testonly = 1,
|
|
|
|
srcs = ["internal/exception_safety_testing.cc"],
|
|
|
|
hdrs = ["internal/exception_safety_testing.h"],
|
2019-08-30 21:03:24 +02:00
|
|
|
copts = ABSL_TEST_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-10-30 23:55:37 +01:00
|
|
|
deps = [
|
|
|
|
":config",
|
|
|
|
":pretty_function",
|
2017-11-22 16:42:54 +01:00
|
|
|
"//absl/memory",
|
2017-10-30 23:55:37 +01:00
|
|
|
"//absl/meta:type_traits",
|
|
|
|
"//absl/strings",
|
2018-11-06 22:01:25 +01:00
|
|
|
"//absl/utility",
|
2017-10-30 23:55:37 +01:00
|
|
|
"@com_google_googletest//:gtest",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "exception_safety_testing_test",
|
|
|
|
srcs = ["exception_safety_testing_test.cc"],
|
2019-08-30 21:03:24 +02:00
|
|
|
copts = ABSL_TEST_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-10-30 23:55:37 +01:00
|
|
|
deps = [
|
|
|
|
":exception_safety_testing",
|
|
|
|
"//absl/memory",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2018-01-24 20:58:42 +01:00
|
|
|
cc_test(
|
|
|
|
name = "inline_variable_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = [
|
|
|
|
"inline_variable_test.cc",
|
|
|
|
"inline_variable_test_a.cc",
|
|
|
|
"inline_variable_test_b.cc",
|
|
|
|
"internal/inline_variable_testing.h",
|
|
|
|
],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2018-01-24 20:58:42 +01:00
|
|
|
deps = [
|
|
|
|
":base_internal",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2017-09-19 22:54:40 +02:00
|
|
|
cc_test(
|
|
|
|
name = "invoke_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["invoke_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":base_internal",
|
|
|
|
"//absl/memory",
|
2017-09-26 00:35:12 +02:00
|
|
|
"//absl/strings",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
# Common test library made available for use in non-absl code that overrides
|
|
|
|
# AbslInternalSpinLockDelay and AbslInternalSpinLockWake.
|
|
|
|
cc_library(
|
|
|
|
name = "spinlock_test_common",
|
|
|
|
testonly = 1,
|
|
|
|
srcs = ["spinlock_test_common.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":base",
|
Export of internal Abseil changes
--
f13697e3d33803f9667d124072da4f6dd8bfbf85 by Andy Soffer <asoffer@google.com>:
Addressing https://github.com/abseil/abseil-cpp/issues/314, fixing
CMakeLists.txt to reference ABSL_TEST_COPTS rather than ABSL_DEFAULT_COPTS.
ABSL_TEST_COPTS should be preferred for all tests so that they are configured consistently (moreover, CMake should agree with Bazel).
PiperOrigin-RevId: 274932312
--
c31c24a1fa6bb98136adf51ef37c0818ac366690 by Derek Mauro <dmauro@google.com>:
Silence MSAN in the stack consumption test utility
PiperOrigin-RevId: 274912950
--
2412913c05a246cd527cd4c31452f126e9129f3a by CJ Johnson <johnsoncj@google.com>:
Internal change
PiperOrigin-RevId: 274847103
--
75e984a93b5760873501b96ac3229ccfd955daf8 by Abseil Team <absl-team@google.com>:
Reformat BUILD file to current standards.
PiperOrigin-RevId: 274815392
--
a2780e085f1df1e4ca2c814a58c893d1b78a1d9c by Samuel Benzaquen <sbenza@google.com>:
Fix invalid result regarding leading zeros in the exponent.
PiperOrigin-RevId: 274808017
--
dd402e1cb5c4ebacb576372ae24bf289d729d323 by Samuel Benzaquen <sbenza@google.com>:
Make string_view's relational operators constexpr when possible.
PiperOrigin-RevId: 274807873
--
b4ef32565653a5da1cb8bb8d0351586d23519658 by Abseil Team <absl-team@google.com>:
Internal rework.
PiperOrigin-RevId: 274787159
--
70d81971c5914e6785b8e8a9d4f6eb2655dd62c0 by Gennadiy Rozental <rogeeff@google.com>:
Internal rework.
PiperOrigin-RevId: 274715557
--
14f5b0440e353b899cafaaa15b53e77f98f401af by Gennadiy Rozental <rogeeff@google.com>:
Make deprecated statements about ParseFLag/UnparseFlag consistent in a file.
PiperOrigin-RevId: 274668123
--
2e85adbdbb92612e4d750bc34fbca3333128b42d by Abseil Team <absl-team@google.com>:
Allow absl::c_equal to be used with arrays.
This is achieved by allowing container size computation for arrays.
PiperOrigin-RevId: 274426830
--
219719f107226d328773e6cec99fb473f5d3119c by Gennadiy Rozental <rogeeff@google.com>:
Release correct extension interfaces to support usage of absl::Time and absl::Duration as ABSL_FLAG
PiperOrigin-RevId: 274273788
--
47a77f93fda23b69b4a6bdbd506fe643c69a5579 by Gennadiy Rozental <rogeeff@google.com>:
Rework of flags persistence/FlagSaver internals.
PiperOrigin-RevId: 274225213
--
7807be3fe757c19e3b0c487298387683d4c9f5b3 by Abseil Team <absl-team@google.com>:
Switch reference to sdkddkver.h to lowercase, matching conventions used in the Windows SDK and other uses. This helps to avoid confusion on case-sensitive filesystems.
PiperOrigin-RevId: 274061877
--
561304090087a19f1d10f0475f564fe132ebf06e by Andy Getzendanner <durandal@google.com>:
Fix ABSL_WAITER_MODE detection for mingw
Import of https://github.com/abseil/abseil-cpp/pull/342
PiperOrigin-RevId: 274030071
--
9b3caac2cf202b9d440dfa1b4ffd538ac4bf715b by Derek Mauro <dmauro@google.com>:
Support using Abseil with the musl libc implementation.
Only test changes were required:
* Workaround for a bug in sigaltstack() on musl
* printf-style pointer formatting (%p) is implementation defined,
so verify StrFromat produces something compatible
* Fix detection of feenableexcept()
PiperOrigin-RevId: 274011666
--
73e8a938fc139e1cc8670d4513a445bacc855539 by Abseil Team <absl-team@google.com>:
nvcc workaround: explicitly specify the definition of node_handle::Base
PiperOrigin-RevId: 274011392
--
ab9cc6d042aca7d48e16c504ab10eab39433f4b2 by Andy Soffer <asoffer@google.com>:
Internal change
PiperOrigin-RevId: 273996318
--
e567c4979ca99c7e71821ec1523b8f5edd2c76ac by Abseil Team <absl-team@google.com>:
Introduce a type alias to work around an nvcc bug.
On the previous code, nvcc gets confused thinking that T has to be a parameter
pack, as IsDecomposable accepts one.
PiperOrigin-RevId: 273980472
--
105b6e6339b77a32f4432de05f44cd3f9c436751 by Eric Fiselier <ericwf@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 273955589
--
8feb87ff1d7e721fe094855e67c19539d5e582b7 by Abseil Team <absl-team@google.com>:
Avoid dual-exporting scheduling_mode.h
PiperOrigin-RevId: 273825112
--
fbc37854776d295dae98fb9d06a541f296daab95 by Andy Getzendanner <durandal@google.com>:
Fix ABSL_HAVE_ALARM check on mingw
Import of https://github.com/abseil/abseil-cpp/pull/341
PiperOrigin-RevId: 273817839
--
6aedcd63a735b9133e143b043744ba0a25407f6f by Andy Soffer <asoffer@google.com>:
Remove bit_gen_view.h now that all callers have been migrated to bit_gen_ref.h
Tested:
TGP - https://test.corp.google.com/ui#id=OCL:273762409:BASE:273743370:1570639020744:3001bcb5
PiperOrigin-RevId: 273810331
--
6573de24a66ba715c579f7f32b5c48a1d743c7f8 by Abseil Team <absl-team@google.com>:
Internal change.
PiperOrigin-RevId: 273589963
--
91c8c28b6dca26d98b39e8e06a8ed17c701ff793 by Abseil Team <absl-team@google.com>:
Update macro name for `ABSL_GUARDED_BY()` in the example section.
PiperOrigin-RevId: 273286983
--
0ff7d1a93d70f8ecd693f8dbb98b7a4a016ca2a4 by Abseil Team <absl-team@google.com>:
Fix potential integer overflow in the absl time library.
In absl::FromTM, the tm.tm_year is added by 1900 regarding that tm.tm_year represents the years since 1900. This change checks integer overflow before doing the arithmetic operation.
PiperOrigin-RevId: 273092952
--
b41c2a1310086807be09a833099ae6d4009f037c by Gennadiy Rozental <rogeeff@google.com>:
Correctly Unlock the global mutex in case of concurrent flag initialization.
Fixes #386
PiperOrigin-RevId: 272979749
--
c53103e71b2a6063af3c6d4ff68aa2d8f9ae9e06 by Abseil Team <absl-team@google.com>:
Try to become idle only when there is no wakeup.
Immediately after waking up (when futex wait returns), the current thread tries
to become idle doing bunch of memory loads and a branch. Problem is that there
is a good chance that we woke up due to a wakeup, especially for actively used
threads. For such wakeups, calling MaybeBecomeIdle() would be a waste of
cycles.
Instead, call MaybeBecomeIdle() only when we are sure there is no wakeup. For
idle threads the net effect should be the same. For active, threads this will
be more efficient.
Moreover, since MaybeBecomeIdle() is called before waiting on the futex, the
current thread will try to become idle before sleeping. This should result
in more accurate idleness and more efficient release of thread resources.
PiperOrigin-RevId: 272940381
GitOrigin-RevId: f13697e3d33803f9667d124072da4f6dd8bfbf85
Change-Id: I36de05aec12595183725652dd362dfa58fb095d0
2019-10-16 03:18:40 +02:00
|
|
|
":base_internal",
|
2017-09-20 02:15:26 +02:00
|
|
|
":core_headers",
|
2017-09-19 22:54:40 +02:00
|
|
|
"//absl/synchronization",
|
|
|
|
"@com_google_googletest//:gtest",
|
|
|
|
],
|
|
|
|
alwayslink = 1,
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "spinlock_test",
|
|
|
|
size = "medium",
|
|
|
|
srcs = ["spinlock_test_common.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":base",
|
Export of internal Abseil changes
--
f13697e3d33803f9667d124072da4f6dd8bfbf85 by Andy Soffer <asoffer@google.com>:
Addressing https://github.com/abseil/abseil-cpp/issues/314, fixing
CMakeLists.txt to reference ABSL_TEST_COPTS rather than ABSL_DEFAULT_COPTS.
ABSL_TEST_COPTS should be preferred for all tests so that they are configured consistently (moreover, CMake should agree with Bazel).
PiperOrigin-RevId: 274932312
--
c31c24a1fa6bb98136adf51ef37c0818ac366690 by Derek Mauro <dmauro@google.com>:
Silence MSAN in the stack consumption test utility
PiperOrigin-RevId: 274912950
--
2412913c05a246cd527cd4c31452f126e9129f3a by CJ Johnson <johnsoncj@google.com>:
Internal change
PiperOrigin-RevId: 274847103
--
75e984a93b5760873501b96ac3229ccfd955daf8 by Abseil Team <absl-team@google.com>:
Reformat BUILD file to current standards.
PiperOrigin-RevId: 274815392
--
a2780e085f1df1e4ca2c814a58c893d1b78a1d9c by Samuel Benzaquen <sbenza@google.com>:
Fix invalid result regarding leading zeros in the exponent.
PiperOrigin-RevId: 274808017
--
dd402e1cb5c4ebacb576372ae24bf289d729d323 by Samuel Benzaquen <sbenza@google.com>:
Make string_view's relational operators constexpr when possible.
PiperOrigin-RevId: 274807873
--
b4ef32565653a5da1cb8bb8d0351586d23519658 by Abseil Team <absl-team@google.com>:
Internal rework.
PiperOrigin-RevId: 274787159
--
70d81971c5914e6785b8e8a9d4f6eb2655dd62c0 by Gennadiy Rozental <rogeeff@google.com>:
Internal rework.
PiperOrigin-RevId: 274715557
--
14f5b0440e353b899cafaaa15b53e77f98f401af by Gennadiy Rozental <rogeeff@google.com>:
Make deprecated statements about ParseFLag/UnparseFlag consistent in a file.
PiperOrigin-RevId: 274668123
--
2e85adbdbb92612e4d750bc34fbca3333128b42d by Abseil Team <absl-team@google.com>:
Allow absl::c_equal to be used with arrays.
This is achieved by allowing container size computation for arrays.
PiperOrigin-RevId: 274426830
--
219719f107226d328773e6cec99fb473f5d3119c by Gennadiy Rozental <rogeeff@google.com>:
Release correct extension interfaces to support usage of absl::Time and absl::Duration as ABSL_FLAG
PiperOrigin-RevId: 274273788
--
47a77f93fda23b69b4a6bdbd506fe643c69a5579 by Gennadiy Rozental <rogeeff@google.com>:
Rework of flags persistence/FlagSaver internals.
PiperOrigin-RevId: 274225213
--
7807be3fe757c19e3b0c487298387683d4c9f5b3 by Abseil Team <absl-team@google.com>:
Switch reference to sdkddkver.h to lowercase, matching conventions used in the Windows SDK and other uses. This helps to avoid confusion on case-sensitive filesystems.
PiperOrigin-RevId: 274061877
--
561304090087a19f1d10f0475f564fe132ebf06e by Andy Getzendanner <durandal@google.com>:
Fix ABSL_WAITER_MODE detection for mingw
Import of https://github.com/abseil/abseil-cpp/pull/342
PiperOrigin-RevId: 274030071
--
9b3caac2cf202b9d440dfa1b4ffd538ac4bf715b by Derek Mauro <dmauro@google.com>:
Support using Abseil with the musl libc implementation.
Only test changes were required:
* Workaround for a bug in sigaltstack() on musl
* printf-style pointer formatting (%p) is implementation defined,
so verify StrFromat produces something compatible
* Fix detection of feenableexcept()
PiperOrigin-RevId: 274011666
--
73e8a938fc139e1cc8670d4513a445bacc855539 by Abseil Team <absl-team@google.com>:
nvcc workaround: explicitly specify the definition of node_handle::Base
PiperOrigin-RevId: 274011392
--
ab9cc6d042aca7d48e16c504ab10eab39433f4b2 by Andy Soffer <asoffer@google.com>:
Internal change
PiperOrigin-RevId: 273996318
--
e567c4979ca99c7e71821ec1523b8f5edd2c76ac by Abseil Team <absl-team@google.com>:
Introduce a type alias to work around an nvcc bug.
On the previous code, nvcc gets confused thinking that T has to be a parameter
pack, as IsDecomposable accepts one.
PiperOrigin-RevId: 273980472
--
105b6e6339b77a32f4432de05f44cd3f9c436751 by Eric Fiselier <ericwf@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 273955589
--
8feb87ff1d7e721fe094855e67c19539d5e582b7 by Abseil Team <absl-team@google.com>:
Avoid dual-exporting scheduling_mode.h
PiperOrigin-RevId: 273825112
--
fbc37854776d295dae98fb9d06a541f296daab95 by Andy Getzendanner <durandal@google.com>:
Fix ABSL_HAVE_ALARM check on mingw
Import of https://github.com/abseil/abseil-cpp/pull/341
PiperOrigin-RevId: 273817839
--
6aedcd63a735b9133e143b043744ba0a25407f6f by Andy Soffer <asoffer@google.com>:
Remove bit_gen_view.h now that all callers have been migrated to bit_gen_ref.h
Tested:
TGP - https://test.corp.google.com/ui#id=OCL:273762409:BASE:273743370:1570639020744:3001bcb5
PiperOrigin-RevId: 273810331
--
6573de24a66ba715c579f7f32b5c48a1d743c7f8 by Abseil Team <absl-team@google.com>:
Internal change.
PiperOrigin-RevId: 273589963
--
91c8c28b6dca26d98b39e8e06a8ed17c701ff793 by Abseil Team <absl-team@google.com>:
Update macro name for `ABSL_GUARDED_BY()` in the example section.
PiperOrigin-RevId: 273286983
--
0ff7d1a93d70f8ecd693f8dbb98b7a4a016ca2a4 by Abseil Team <absl-team@google.com>:
Fix potential integer overflow in the absl time library.
In absl::FromTM, the tm.tm_year is added by 1900 regarding that tm.tm_year represents the years since 1900. This change checks integer overflow before doing the arithmetic operation.
PiperOrigin-RevId: 273092952
--
b41c2a1310086807be09a833099ae6d4009f037c by Gennadiy Rozental <rogeeff@google.com>:
Correctly Unlock the global mutex in case of concurrent flag initialization.
Fixes #386
PiperOrigin-RevId: 272979749
--
c53103e71b2a6063af3c6d4ff68aa2d8f9ae9e06 by Abseil Team <absl-team@google.com>:
Try to become idle only when there is no wakeup.
Immediately after waking up (when futex wait returns), the current thread tries
to become idle doing bunch of memory loads and a branch. Problem is that there
is a good chance that we woke up due to a wakeup, especially for actively used
threads. For such wakeups, calling MaybeBecomeIdle() would be a waste of
cycles.
Instead, call MaybeBecomeIdle() only when we are sure there is no wakeup. For
idle threads the net effect should be the same. For active, threads this will
be more efficient.
Moreover, since MaybeBecomeIdle() is called before waiting on the futex, the
current thread will try to become idle before sleeping. This should result
in more accurate idleness and more efficient release of thread resources.
PiperOrigin-RevId: 272940381
GitOrigin-RevId: f13697e3d33803f9667d124072da4f6dd8bfbf85
Change-Id: I36de05aec12595183725652dd362dfa58fb095d0
2019-10-16 03:18:40 +02:00
|
|
|
":base_internal",
|
2017-09-20 02:15:26 +02:00
|
|
|
":core_headers",
|
2017-09-19 22:54:40 +02:00
|
|
|
"//absl/synchronization",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2018-12-04 20:01:12 +01:00
|
|
|
cc_library(
|
|
|
|
name = "spinlock_benchmark_common",
|
|
|
|
testonly = 1,
|
|
|
|
srcs = ["internal/spinlock_benchmark.cc"],
|
2019-03-13 22:59:43 +01:00
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2018-12-04 20:01:12 +01:00
|
|
|
visibility = [
|
|
|
|
"//absl/base:__pkg__",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
":base",
|
|
|
|
":base_internal",
|
2019-08-13 19:20:16 +02:00
|
|
|
":raw_logging_internal",
|
2018-12-04 20:01:12 +01:00
|
|
|
"//absl/synchronization",
|
|
|
|
"@com_github_google_benchmark//:benchmark_main",
|
|
|
|
],
|
|
|
|
alwayslink = 1,
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "spinlock_benchmark",
|
|
|
|
testonly = 1,
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2018-12-04 20:01:12 +01:00
|
|
|
visibility = ["//visibility:private"],
|
|
|
|
deps = [
|
|
|
|
":spinlock_benchmark_common",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2017-09-19 22:54:40 +02:00
|
|
|
cc_library(
|
|
|
|
name = "endian",
|
|
|
|
hdrs = [
|
|
|
|
"internal/endian.h",
|
|
|
|
"internal/unaligned_access.h",
|
|
|
|
],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":config",
|
|
|
|
":core_headers",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "endian_test",
|
|
|
|
srcs = ["internal/endian_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
|
|
|
deps = [
|
|
|
|
":config",
|
|
|
|
":endian",
|
2017-09-26 00:35:12 +02:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "config_test",
|
|
|
|
srcs = ["config_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":config",
|
2017-09-29 17:44:28 +02:00
|
|
|
"//absl/synchronization:thread_pool",
|
2017-09-26 00:35:12 +02:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "call_once_test",
|
|
|
|
srcs = ["call_once_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":base",
|
|
|
|
":core_headers",
|
|
|
|
"//absl/synchronization",
|
2017-09-26 00:35:12 +02:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "raw_logging_test",
|
|
|
|
srcs = ["raw_logging_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
2019-08-13 19:20:16 +02:00
|
|
|
":raw_logging_internal",
|
2018-07-12 19:34:29 +02:00
|
|
|
"//absl/strings",
|
2017-09-19 22:54:40 +02:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "sysinfo_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["internal/sysinfo_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":base",
|
|
|
|
"//absl/synchronization",
|
2017-09-26 00:35:12 +02:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "low_level_alloc_test",
|
2019-05-10 21:38:49 +02:00
|
|
|
size = "medium",
|
2017-09-19 22:54:40 +02:00
|
|
|
srcs = ["internal/low_level_alloc_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2018-06-26 19:45:35 +02:00
|
|
|
tags = ["no_test_ios_x86_64"],
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [":malloc_internal"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "thread_identity_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["internal/thread_identity_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2017-09-19 22:54:40 +02:00
|
|
|
deps = [
|
|
|
|
":base",
|
2017-09-20 02:15:26 +02:00
|
|
|
":core_headers",
|
2017-09-19 22:54:40 +02:00
|
|
|
"//absl/synchronization",
|
2017-09-26 00:35:12 +02:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
2017-09-19 22:54:40 +02:00
|
|
|
)
|
2018-05-04 18:58:56 +02:00
|
|
|
|
2018-05-17 18:05:57 +02:00
|
|
|
cc_test(
|
2018-05-04 18:58:56 +02:00
|
|
|
name = "thread_identity_benchmark",
|
|
|
|
srcs = ["internal/thread_identity_benchmark.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2018-05-17 18:05:57 +02:00
|
|
|
tags = ["benchmark"],
|
2018-05-04 18:58:56 +02:00
|
|
|
visibility = ["//visibility:private"],
|
|
|
|
deps = [
|
|
|
|
":base",
|
|
|
|
"//absl/synchronization",
|
2018-05-31 21:26:35 +02:00
|
|
|
"@com_github_google_benchmark//:benchmark_main",
|
2018-05-04 18:58:56 +02:00
|
|
|
],
|
|
|
|
)
|
2018-08-23 19:41:14 +02:00
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "bits",
|
|
|
|
hdrs = ["internal/bits.h"],
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2018-08-23 19:41:14 +02:00
|
|
|
visibility = [
|
|
|
|
"//absl:__subpackages__",
|
|
|
|
],
|
2019-12-10 18:03:32 +01:00
|
|
|
deps = [
|
|
|
|
":config",
|
|
|
|
":core_headers",
|
|
|
|
],
|
2018-08-23 19:41:14 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "bits_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["internal/bits_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2018-08-23 19:41:14 +02:00
|
|
|
deps = [
|
|
|
|
":bits",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
2019-03-08 23:06:50 +01:00
|
|
|
|
Export of internal Abseil changes
--
e54b9c7bbb0c58475676c268e2e19c69f4bce48a by Jorg Brown <jorg@google.com>:
Tweak ABSL_PREDICT_TRUE slightly, for better code on some platforms and/or
optimization levels. "false || (x)" is more verbose than "!!(x)", but
ultimately more efficient.
For example, given this code:
void InitIfNecessary() {
if (ABSL_PREDICT_TRUE(NeedsInit())) {
SlowInitIfNecessary();
}
}
Clang with default optimization level will produce:
Before this CL After this CL
InitIfNecessary: InitIfNecessary:
push rbp push rbp
mov rbp, rsp mov rbp, rsp
call NeedsInit call NeedsInit
xor al, -1
xor al, -1
test al, 1 test al, 1
jne .LBB2_1 jne .LBB3_1
jmp .LBB2_2 jmp .LBB3_2
.LBB2_1: .LBB3_1:
call SlowInitIfNecessary call SlowInitIfNecessary
.LBB2_2: .LBB3_2:
pop rbp pop rbp
ret ret
PiperOrigin-RevId: 276401386
--
0a3c4dfd8342bf2b1b11a87f1c662c883f73cab7 by Abseil Team <absl-team@google.com>:
Fix comment nit: sem_open => sem_init.
The code calls sem_init, not sem_open, to initialize an unnamed semaphore.
(sem_open creates or opens a named semaphore.)
PiperOrigin-RevId: 276344072
--
b36a664e9459057509a90e83d3482e1d3a4c44c7 by Abseil Team <absl-team@google.com>:
Fix typo in flat_hash_map.h: exchaged -> exchanged
PiperOrigin-RevId: 276295792
--
7bbd8d18276eb110c8335743e35fceb662ddf3d6 by Samuel Benzaquen <sbenza@google.com>:
Add assertions to verify use of iterators.
PiperOrigin-RevId: 276283300
--
677398a8ffcb1f59182cffe57a4fe7ff147a0404 by Laramie Leavitt <lar@google.com>:
Migrate distribution_impl.h/cc to generate_real.h/cc.
Combine the methods RandU64To<Float,Double> into a single method:
GenerateRealFromBits().
Remove rejection sampling from absl::uniform_real_distribution.
PiperOrigin-RevId: 276158675
--
c60c9d11d24b0c546329d998e78e15a84b3153f5 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 276126962
--
4c840cab6a8d86efa29b397cafaf7520eece68cc by Andy Soffer <asoffer@google.com>:
Update CMakeLists.txt to address https://github.com/abseil/abseil-cpp/issues/365.
This does not cover every platform, but it does at least address the
first-order issue of assuming gcc implies x86.
PiperOrigin-RevId: 276116253
--
98da366e6b5d51afe5d7ac6722126aca23d85ee6 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 276097452
GitOrigin-RevId: e54b9c7bbb0c58475676c268e2e19c69f4bce48a
Change-Id: I02d84454bb71ab21ad3d39650acf6cc6e36f58d7
2019-10-24 04:35:39 +02:00
|
|
|
cc_library(
|
|
|
|
name = "exponential_biased",
|
|
|
|
srcs = ["internal/exponential_biased.cc"],
|
|
|
|
hdrs = ["internal/exponential_biased.h"],
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
visibility = [
|
|
|
|
"//absl:__subpackages__",
|
|
|
|
],
|
2019-12-10 18:03:32 +01:00
|
|
|
deps = [
|
|
|
|
":config",
|
|
|
|
":core_headers",
|
|
|
|
],
|
Export of internal Abseil changes
--
e54b9c7bbb0c58475676c268e2e19c69f4bce48a by Jorg Brown <jorg@google.com>:
Tweak ABSL_PREDICT_TRUE slightly, for better code on some platforms and/or
optimization levels. "false || (x)" is more verbose than "!!(x)", but
ultimately more efficient.
For example, given this code:
void InitIfNecessary() {
if (ABSL_PREDICT_TRUE(NeedsInit())) {
SlowInitIfNecessary();
}
}
Clang with default optimization level will produce:
Before this CL After this CL
InitIfNecessary: InitIfNecessary:
push rbp push rbp
mov rbp, rsp mov rbp, rsp
call NeedsInit call NeedsInit
xor al, -1
xor al, -1
test al, 1 test al, 1
jne .LBB2_1 jne .LBB3_1
jmp .LBB2_2 jmp .LBB3_2
.LBB2_1: .LBB3_1:
call SlowInitIfNecessary call SlowInitIfNecessary
.LBB2_2: .LBB3_2:
pop rbp pop rbp
ret ret
PiperOrigin-RevId: 276401386
--
0a3c4dfd8342bf2b1b11a87f1c662c883f73cab7 by Abseil Team <absl-team@google.com>:
Fix comment nit: sem_open => sem_init.
The code calls sem_init, not sem_open, to initialize an unnamed semaphore.
(sem_open creates or opens a named semaphore.)
PiperOrigin-RevId: 276344072
--
b36a664e9459057509a90e83d3482e1d3a4c44c7 by Abseil Team <absl-team@google.com>:
Fix typo in flat_hash_map.h: exchaged -> exchanged
PiperOrigin-RevId: 276295792
--
7bbd8d18276eb110c8335743e35fceb662ddf3d6 by Samuel Benzaquen <sbenza@google.com>:
Add assertions to verify use of iterators.
PiperOrigin-RevId: 276283300
--
677398a8ffcb1f59182cffe57a4fe7ff147a0404 by Laramie Leavitt <lar@google.com>:
Migrate distribution_impl.h/cc to generate_real.h/cc.
Combine the methods RandU64To<Float,Double> into a single method:
GenerateRealFromBits().
Remove rejection sampling from absl::uniform_real_distribution.
PiperOrigin-RevId: 276158675
--
c60c9d11d24b0c546329d998e78e15a84b3153f5 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 276126962
--
4c840cab6a8d86efa29b397cafaf7520eece68cc by Andy Soffer <asoffer@google.com>:
Update CMakeLists.txt to address https://github.com/abseil/abseil-cpp/issues/365.
This does not cover every platform, but it does at least address the
first-order issue of assuming gcc implies x86.
PiperOrigin-RevId: 276116253
--
98da366e6b5d51afe5d7ac6722126aca23d85ee6 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 276097452
GitOrigin-RevId: e54b9c7bbb0c58475676c268e2e19c69f4bce48a
Change-Id: I02d84454bb71ab21ad3d39650acf6cc6e36f58d7
2019-10-24 04:35:39 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "exponential_biased_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["internal/exponential_biased_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
visibility = ["//visibility:private"],
|
|
|
|
deps = [
|
|
|
|
":exponential_biased",
|
|
|
|
"//absl/strings",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-11-15 17:07:12 +01:00
|
|
|
cc_library(
|
|
|
|
name = "periodic_sampler",
|
|
|
|
srcs = ["internal/periodic_sampler.cc"],
|
|
|
|
hdrs = ["internal/periodic_sampler.h"],
|
|
|
|
copts = ABSL_DEFAULT_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
deps = [
|
|
|
|
":core_headers",
|
|
|
|
":exponential_biased",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "periodic_sampler_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["internal/periodic_sampler_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
visibility = ["//visibility:private"],
|
|
|
|
deps = [
|
|
|
|
":core_headers",
|
|
|
|
":periodic_sampler",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "periodic_sampler_benchmark",
|
|
|
|
testonly = 1,
|
|
|
|
srcs = ["internal/periodic_sampler_benchmark.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
tags = ["benchmark"],
|
|
|
|
visibility = ["//visibility:private"],
|
|
|
|
deps = [
|
|
|
|
":core_headers",
|
|
|
|
":periodic_sampler",
|
|
|
|
"@com_github_google_benchmark//:benchmark_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-03-08 23:06:50 +01:00
|
|
|
cc_library(
|
|
|
|
name = "scoped_set_env",
|
|
|
|
testonly = 1,
|
|
|
|
srcs = ["internal/scoped_set_env.cc"],
|
|
|
|
hdrs = ["internal/scoped_set_env.h"],
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2019-03-08 23:06:50 +01:00
|
|
|
visibility = [
|
|
|
|
"//absl:__subpackages__",
|
|
|
|
],
|
2019-12-10 18:03:32 +01:00
|
|
|
deps = [
|
|
|
|
":config",
|
|
|
|
":raw_logging_internal",
|
|
|
|
],
|
2019-03-08 23:06:50 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "scoped_set_env_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["internal/scoped_set_env_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
2019-03-27 16:05:41 +01:00
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
2019-03-08 23:06:50 +01:00
|
|
|
deps = [
|
|
|
|
":scoped_set_env",
|
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
2019-04-12 09:26:40 +02:00
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "log_severity_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["log_severity_test.cc"],
|
|
|
|
copts = ABSL_TEST_COPTS,
|
|
|
|
linkopts = ABSL_DEFAULT_LINKOPTS,
|
|
|
|
deps = [
|
2019-07-18 18:04:43 +02:00
|
|
|
":log_severity",
|
2019-09-19 18:27:34 +02:00
|
|
|
"//absl/flags:marshalling",
|
|
|
|
"//absl/strings",
|
2019-04-12 09:26:40 +02:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|