summaryrefslogtreecommitdiff
path: root/absl/base/BUILD.bazel
diff options
context:
space:
mode:
Diffstat (limited to 'absl/base/BUILD.bazel')
-rw-r--r--absl/base/BUILD.bazel70
1 files changed, 67 insertions, 3 deletions
diff --git a/absl/base/BUILD.bazel b/absl/base/BUILD.bazel
index d117a4fe..4566c697 100644
--- a/absl/base/BUILD.bazel
+++ b/absl/base/BUILD.bazel
@@ -19,6 +19,7 @@ load(
"ABSL_DEFAULT_COPTS",
"ABSL_TEST_COPTS",
"ABSL_EXCEPTIONS_FLAG",
+ "ABSL_EXCEPTIONS_FLAG_LINKOPTS",
)
package(default_visibility = ["//visibility:public"])
@@ -29,6 +30,7 @@ cc_library(
name = "spinlock_wait",
srcs = [
"internal/spinlock_akaros.inc",
+ "internal/spinlock_linux.inc",
"internal/spinlock_posix.inc",
"internal/spinlock_wait.cc",
"internal/spinlock_win32.inc",
@@ -73,7 +75,6 @@ cc_library(
copts = ABSL_DEFAULT_COPTS,
deps = [
":config",
- ":dynamic_annotations",
],
)
@@ -106,6 +107,7 @@ cc_library(
"internal/identity.h",
"internal/inline_variable.h",
"internal/invoke.h",
+ "internal/scheduling_mode.h",
],
copts = ABSL_DEFAULT_COPTS,
visibility = [
@@ -179,13 +181,13 @@ cc_library(
srcs = ["internal/throw_delegate.cc"],
hdrs = ["internal/throw_delegate.h"],
copts = ABSL_DEFAULT_COPTS + ABSL_EXCEPTIONS_FLAG,
+ linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
visibility = [
"//absl:__subpackages__",
],
deps = [
":base",
":config",
- ":core_headers",
],
)
@@ -193,6 +195,7 @@ cc_test(
name = "throw_delegate_test",
srcs = ["throw_delegate_test.cc"],
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
+ linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
deps = [
":throw_delegate",
"@com_google_googletest//:gtest_main",
@@ -225,6 +228,7 @@ cc_library(
srcs = ["internal/exception_safety_testing.cc"],
hdrs = ["internal/exception_safety_testing.h"],
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
+ linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
deps = [
":base",
":config",
@@ -232,7 +236,7 @@ cc_library(
"//absl/memory",
"//absl/meta:type_traits",
"//absl/strings",
- "//absl/types:optional",
+ "//absl/utility",
"@com_google_googletest//:gtest",
],
)
@@ -241,6 +245,7 @@ cc_test(
name = "exception_safety_testing_test",
srcs = ["exception_safety_testing_test.cc"],
copts = ABSL_TEST_COPTS + ABSL_EXCEPTIONS_FLAG,
+ linkopts = ABSL_EXCEPTIONS_FLAG_LINKOPTS,
deps = [
":exception_safety_testing",
"//absl/memory",
@@ -299,6 +304,7 @@ cc_test(
size = "medium",
srcs = ["spinlock_test_common.cc"],
copts = ABSL_TEST_COPTS,
+ tags = ["no_test_wasm"],
deps = [
":base",
":core_headers",
@@ -309,6 +315,33 @@ cc_test(
)
cc_library(
+ name = "spinlock_benchmark_common",
+ testonly = 1,
+ srcs = ["internal/spinlock_benchmark.cc"],
+ copts = ABSL_DEFAULT_COPTS,
+ visibility = [
+ "//absl/base:__pkg__",
+ ],
+ deps = [
+ ":base",
+ ":base_internal",
+ "//absl/synchronization",
+ "@com_github_google_benchmark//:benchmark_main",
+ ],
+ alwayslink = 1,
+)
+
+cc_binary(
+ name = "spinlock_benchmark",
+ testonly = 1,
+ copts = ABSL_DEFAULT_COPTS,
+ visibility = ["//visibility:private"],
+ deps = [
+ ":spinlock_benchmark_common",
+ ],
+)
+
+cc_library(
name = "endian",
hdrs = [
"internal/endian.h",
@@ -337,6 +370,9 @@ cc_test(
name = "config_test",
srcs = ["config_test.cc"],
copts = ABSL_TEST_COPTS,
+ tags = [
+ "no_test_wasm",
+ ],
deps = [
":config",
"//absl/synchronization:thread_pool",
@@ -348,6 +384,9 @@ cc_test(
name = "call_once_test",
srcs = ["call_once_test.cc"],
copts = ABSL_TEST_COPTS,
+ tags = [
+ "no_test_wasm",
+ ],
deps = [
":base",
":core_headers",
@@ -362,6 +401,7 @@ cc_test(
copts = ABSL_TEST_COPTS,
deps = [
":base",
+ "//absl/strings",
"@com_google_googletest//:gtest_main",
],
)
@@ -387,6 +427,7 @@ cc_test(
"//absl:windows": [],
"//conditions:default": ["-pthread"],
}),
+ tags = ["no_test_ios_x86_64"],
deps = [":malloc_internal"],
)
@@ -399,6 +440,9 @@ cc_test(
"//absl:windows": [],
"//conditions:default": ["-pthread"],
}),
+ tags = [
+ "no_test_wasm",
+ ],
deps = [
":base",
":core_headers",
@@ -419,3 +463,23 @@ cc_test(
"@com_github_google_benchmark//:benchmark_main",
],
)
+
+cc_library(
+ name = "bits",
+ hdrs = ["internal/bits.h"],
+ visibility = [
+ "//absl:__subpackages__",
+ ],
+ deps = [":core_headers"],
+)
+
+cc_test(
+ name = "bits_test",
+ size = "small",
+ srcs = ["internal/bits_test.cc"],
+ copts = ABSL_TEST_COPTS,
+ deps = [
+ ":bits",
+ "@com_google_googletest//:gtest_main",
+ ],
+)