aboutsummaryrefslogtreecommitdiff
path: root/absl/base/BUILD.bazel
diff options
context:
space:
mode:
Diffstat (limited to 'absl/base/BUILD.bazel')
-rw-r--r--absl/base/BUILD.bazel83
1 files changed, 75 insertions, 8 deletions
diff --git a/absl/base/BUILD.bazel b/absl/base/BUILD.bazel
index fb008db3..0eb735da 100644
--- a/absl/base/BUILD.bazel
+++ b/absl/base/BUILD.bazel
@@ -21,7 +21,14 @@ load(
"ABSL_TEST_COPTS",
)
-package(default_visibility = ["//visibility:public"])
+package(
+ default_visibility = ["//visibility:public"],
+ features = [
+ "header_modules",
+ "layering_check",
+ "parse_headers",
+ ],
+)
licenses(["notice"])
@@ -63,6 +70,14 @@ cc_library(
)
cc_library(
+ name = "no_destructor",
+ hdrs = ["no_destructor.h"],
+ copts = ABSL_DEFAULT_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
+ deps = [":config"],
+)
+
+cc_library(
name = "nullability",
srcs = ["internal/nullability_impl.h"],
hdrs = ["nullability.h"],
@@ -160,9 +175,6 @@ cc_library(
cc_library(
name = "core_headers",
- srcs = [
- "internal/thread_annotations.h",
- ],
hdrs = [
"attributes.h",
"const_init.h",
@@ -273,6 +285,7 @@ cc_library(
":cycleclock_internal",
":dynamic_annotations",
":log_severity",
+ ":nullability",
":raw_logging_internal",
":spinlock_wait",
"//absl/meta:type_traits",
@@ -302,6 +315,7 @@ cc_test(
":atomic_hook",
":atomic_hook_test_helper",
":core_headers",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -317,6 +331,7 @@ cc_test(
deps = [
":base",
":core_headers",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -344,6 +359,7 @@ cc_test(
deps = [
":config",
":throw_delegate",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -357,6 +373,7 @@ cc_test(
deps = [
":errno_saver",
":strerror",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -380,7 +397,9 @@ cc_library(
name = "pretty_function",
hdrs = ["internal/pretty_function.h"],
linkopts = ABSL_DEFAULT_LINKOPTS,
- visibility = ["//absl:__subpackages__"],
+ visibility = [
+ "//absl:__subpackages__",
+ ],
)
cc_library(
@@ -409,6 +428,7 @@ cc_test(
deps = [
":exception_safety_testing",
"//absl/memory",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -426,6 +446,7 @@ cc_test(
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":base_internal",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -440,6 +461,7 @@ cc_test(
":base_internal",
"//absl/memory",
"//absl/strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -478,6 +500,7 @@ cc_test(
":config",
":core_headers",
"//absl/synchronization",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -494,6 +517,7 @@ cc_library(
deps = [
":base",
":base_internal",
+ ":no_destructor",
":raw_logging_internal",
"//absl/synchronization",
"@com_github_google_benchmark//:benchmark_main",
@@ -525,6 +549,7 @@ cc_library(
":base",
":config",
":core_headers",
+ ":nullability",
],
)
@@ -535,6 +560,7 @@ cc_test(
deps = [
":config",
":endian",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -547,6 +573,7 @@ cc_test(
deps = [
":config",
"//absl/synchronization:thread_pool",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -560,16 +587,47 @@ cc_test(
":base",
":core_headers",
"//absl/synchronization",
+ "@com_google_googletest//:gtest",
+ "@com_google_googletest//:gtest_main",
+ ],
+)
+
+cc_test(
+ name = "no_destructor_test",
+ srcs = ["no_destructor_test.cc"],
+ copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
+ deps = [
+ ":config",
+ ":no_destructor",
+ ":raw_logging_internal",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
+cc_binary(
+ name = "no_destructor_benchmark",
+ testonly = 1,
+ srcs = ["no_destructor_benchmark.cc"],
+ copts = ABSL_TEST_COPTS,
+ linkopts = ABSL_DEFAULT_LINKOPTS,
+ tags = ["benchmark"],
+ visibility = ["//visibility:private"],
+ deps = [
+ ":no_destructor",
+ ":raw_logging_internal",
+ "@com_github_google_benchmark//:benchmark_main",
+ ],
+)
+
cc_test(
name = "nullability_test",
srcs = ["nullability_test.cc"],
deps = [
":core_headers",
":nullability",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -582,6 +640,7 @@ cc_test(
deps = [
":raw_logging_internal",
"//absl/strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -595,6 +654,7 @@ cc_test(
deps = [
":base",
"//absl/synchronization",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -628,6 +688,7 @@ cc_test(
":base",
":core_headers",
"//absl/synchronization",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -643,6 +704,7 @@ cc_test(
":base",
"//absl/synchronization",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -669,6 +731,7 @@ cc_test(
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":scoped_set_env",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -684,6 +747,7 @@ cc_test(
"//absl/flags:flag_internal",
"//absl/flags:marshalling",
"//absl/strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -713,6 +777,7 @@ cc_test(
deps = [
":strerror",
"//absl/strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -752,6 +817,7 @@ cc_test(
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":fast_type_id",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -759,14 +825,13 @@ cc_test(
cc_library(
name = "prefetch",
hdrs = [
- "internal/prefetch.h",
"prefetch.h",
],
copts = ABSL_DEFAULT_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":config",
- ":core_headers", # TODO(b/265984188): remove
+ ":core_headers",
],
)
@@ -774,13 +839,13 @@ cc_test(
name = "prefetch_test",
size = "small",
srcs = [
- "internal/prefetch_test.cc",
"prefetch_test.cc",
],
copts = ABSL_TEST_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
deps = [
":prefetch",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -795,6 +860,7 @@ cc_test(
deps = [
":core_headers",
"//absl/strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -808,6 +874,7 @@ cc_test(
deps = [
":core_headers",
"//absl/types:optional",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)