summaryrefslogtreecommitdiff
path: root/absl/strings
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2023-10-10 13:29:16 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-10-10 13:30:24 -0700
commit143e983739333ce4b30320d26bce8594bd24b5f3 (patch)
tree84515b81a55d409a170ef99683b4c08766829e6a /absl/strings
parent5dc0e78af1c2781644a350d36ae37f0c21e579fe (diff)
Bazel: Support layering_check and parse_headers
The layering_check feature ensures that rules that include a header explicitly depend on a rule that exports that header. Compiler support is required, and currently only Clang 16+ supports diagnoses layering_check failures. The parse_headers feature ensures headers are self-contained by compiling them with -fsyntax-only on supported compilers. PiperOrigin-RevId: 572350144 Change-Id: I37297f761566d686d9dd58d318979d688b7e36d1
Diffstat (limited to 'absl/strings')
-rw-r--r--absl/strings/BUILD.bazel64
1 files changed, 63 insertions, 1 deletions
diff --git a/absl/strings/BUILD.bazel b/absl/strings/BUILD.bazel
index 6d0ed698..af77569a 100644
--- a/absl/strings/BUILD.bazel
+++ b/absl/strings/BUILD.bazel
@@ -22,7 +22,10 @@ load(
package(
default_visibility = ["//visibility:public"],
- features = ["parse_headers"],
+ features = [
+ "layering_check",
+ "parse_headers",
+ ],
)
licenses(["notice"])
@@ -141,6 +144,7 @@ cc_test(
visibility = ["//visibility:private"],
deps = [
":strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -160,6 +164,7 @@ cc_test(
"//absl/base:core_headers",
"//absl/container:fixed_array",
"//absl/log:check",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -177,6 +182,7 @@ cc_test(
":strings",
"//absl/base:raw_logging_internal",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -188,6 +194,7 @@ cc_test(
visibility = ["//visibility:private"],
deps = [
":strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -201,6 +208,7 @@ cc_test(
deps = [
":strings",
"//absl/base:core_headers",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -214,6 +222,7 @@ cc_test(
deps = [
":strings",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -226,6 +235,7 @@ cc_test(
copts = ABSL_TEST_COPTS,
deps = [
"//absl/strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -243,6 +253,7 @@ cc_test(
":strings",
"//absl/base:core_headers",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -258,6 +269,7 @@ cc_test(
deps = [
":strings",
"//absl/base:core_headers",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -273,6 +285,7 @@ cc_test(
deps = [
":internal",
"//absl/base:core_headers",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -286,6 +299,7 @@ cc_test(
deps = [
":strings",
"//absl/meta:type_traits",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -302,6 +316,7 @@ cc_test(
"//absl/base:core_headers",
"//absl/base:raw_logging_internal",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -316,6 +331,7 @@ cc_test(
"//absl/base:config",
"//absl/base:core_headers",
"//absl/base:dynamic_annotations",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -335,6 +351,7 @@ cc_test(
":charset",
"//absl/log:check",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -360,6 +377,7 @@ cc_test(
deps = [
":charset",
":strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -419,6 +437,7 @@ cc_test(
":cord_rep_test_util",
":strings",
"//absl/base:config",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -437,6 +456,7 @@ cc_test(
"//absl/base:config",
"//absl/base:raw_logging_internal",
"//absl/cleanup",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -453,6 +473,7 @@ cc_test(
":strings",
"//absl/base:config",
"//absl/base:raw_logging_internal",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -470,6 +491,7 @@ cc_test(
":strings",
"//absl/base:config",
"//absl/base:raw_logging_internal",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -485,6 +507,7 @@ cc_test(
":cord_rep_test_util",
"//absl/base:config",
"//absl/crc:crc_cord_state",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -508,6 +531,7 @@ cc_test(
"//absl/base:config",
"//absl/base:core_headers",
"//absl/synchronization",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -623,6 +647,7 @@ cc_test(
":cordz_update_scope",
":cordz_update_tracker",
"//absl/base:config",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -683,6 +708,7 @@ cc_test(
":cordz_functions",
":cordz_test_helpers",
"//absl/base:config",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -701,6 +727,7 @@ cc_test(
"//absl/synchronization",
"//absl/synchronization:thread_pool",
"//absl/time",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -722,6 +749,7 @@ cc_test(
"//absl/debugging:stacktrace",
"//absl/debugging:symbolize",
"//absl/types:span",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -743,6 +771,7 @@ cc_test(
"//absl/crc:crc_cord_state",
"//absl/synchronization",
"//absl/synchronization:thread_pool",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -764,6 +793,7 @@ cc_test(
"//absl/synchronization",
"//absl/synchronization:thread_pool",
"//absl/time",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -831,6 +861,7 @@ cc_test(
":string_view",
"//absl/base:config",
"//absl/types:span",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -861,6 +892,7 @@ cc_test(
"//absl/log:check",
"//absl/random",
"//absl/types:optional",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -894,6 +926,7 @@ cc_test(
"//absl/base:config",
"//absl/base:core_headers",
"//absl/base:raw_logging_internal",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -907,6 +940,7 @@ cc_test(
deps = [
":strings",
"//absl/base:core_headers",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -921,6 +955,7 @@ cc_test(
":strings",
"//absl/base:raw_logging_internal",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -932,6 +967,7 @@ cc_test(
visibility = ["//visibility:private"],
deps = [
":strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -948,6 +984,7 @@ cc_test(
"//absl/container:btree",
"//absl/container:flat_hash_map",
"//absl/container:node_hash_map",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -962,6 +999,7 @@ cc_test(
":strings",
"//absl/base:raw_logging_internal",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -973,6 +1011,7 @@ cc_test(
visibility = ["//visibility:private"],
deps = [
":internal",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -986,6 +1025,7 @@ cc_test(
deps = [
":internal",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -1001,6 +1041,7 @@ cc_test(
deps = [
"//absl/base:core_headers",
"//absl/meta:type_traits",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1015,6 +1056,7 @@ cc_test(
":strings",
"//absl/base:core_headers",
"//absl/memory",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1028,6 +1070,7 @@ cc_test(
deps = [
":strings",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -1040,6 +1083,7 @@ cc_test(
deps = [
":str_format",
":strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1053,6 +1097,7 @@ cc_test(
deps = [
":strings",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -1074,6 +1119,7 @@ cc_test(
"//absl/numeric:int128",
"//absl/random",
"//absl/random:distributions",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1090,6 +1136,7 @@ cc_test(
"//absl/random",
"//absl/random:distributions",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -1101,6 +1148,7 @@ cc_test(
visibility = ["//visibility:private"],
deps = [
":strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1113,6 +1161,7 @@ cc_test(
":pow10_helper",
":str_format",
":strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1128,6 +1177,7 @@ cc_test(
":strings",
"//absl/base:config",
"//absl/log:check",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1143,6 +1193,7 @@ cc_test(
deps = [
":strings",
"//absl/base:config",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1158,6 +1209,7 @@ cc_test(
deps = [
":strings",
"@com_github_google_benchmark//:benchmark_main",
+ "@com_google_googletest//:gtest",
],
)
@@ -1224,6 +1276,7 @@ cc_test(
"//absl/base:config",
"//absl/base:core_headers",
"//absl/types:span",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1239,6 +1292,7 @@ cc_test(
":str_format",
":str_format_internal",
":strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1251,6 +1305,7 @@ cc_test(
deps = [
":str_format",
":str_format_internal",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1262,6 +1317,7 @@ cc_test(
visibility = ["//visibility:private"],
deps = [
":str_format_internal",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1273,6 +1329,7 @@ cc_test(
visibility = ["//visibility:private"],
deps = [
":str_format",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1290,6 +1347,7 @@ cc_test(
"//absl/base:raw_logging_internal",
"//absl/log",
"//absl/types:optional",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1302,6 +1360,7 @@ cc_test(
deps = [
":cord",
":str_format_internal",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1314,6 +1373,7 @@ cc_test(
deps = [
":str_format_internal",
"//absl/base:core_headers",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1336,6 +1396,7 @@ cc_test(
deps = [
":pow10_helper",
":str_format",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)
@@ -1363,6 +1424,7 @@ cc_test(
deps = [
":str_format",
":strings",
+ "@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
],
)