diff options
author | Derek Mauro <dmauro@google.com> | 2023-10-10 13:29:16 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-10-10 13:30:24 -0700 |
commit | 143e983739333ce4b30320d26bce8594bd24b5f3 (patch) | |
tree | 84515b81a55d409a170ef99683b4c08766829e6a /absl/types | |
parent | 5dc0e78af1c2781644a350d36ae37f0c21e579fe (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/types')
-rw-r--r-- | absl/types/BUILD.bazel | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/absl/types/BUILD.bazel b/absl/types/BUILD.bazel index 34f398bb..5d3dedba 100644 --- a/absl/types/BUILD.bazel +++ b/absl/types/BUILD.bazel @@ -20,7 +20,13 @@ load( "ABSL_TEST_COPTS", ) -package(default_visibility = ["//visibility:public"]) +package( + default_visibility = ["//visibility:public"], + features = [ + "layering_check", + "parse_headers", + ], +) licenses(["notice"]) @@ -79,6 +85,7 @@ cc_test( "//absl/base:exception_testing", "//absl/container:test_instance_tracker", "//absl/log", + "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], ) @@ -92,6 +99,7 @@ cc_test( ":any", "//absl/base:config", "//absl/base:exception_safety_testing", + "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], ) @@ -129,6 +137,7 @@ cc_test( "//absl/container:inlined_vector", "//absl/hash:hash_testing", "//absl/strings", + "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], ) @@ -188,6 +197,7 @@ cc_test( "//absl/log", "//absl/meta:type_traits", "//absl/strings", + "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], ) @@ -203,6 +213,7 @@ cc_test( ":optional", "//absl/base:config", "//absl/base:exception_safety_testing", + "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], ) @@ -236,6 +247,7 @@ cc_test( "//absl/memory", "//absl/meta:type_traits", "//absl/strings", + "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], ) @@ -252,6 +264,7 @@ cc_test( ":variant", "//absl/utility", "@com_github_google_benchmark//:benchmark_main", + "@com_google_googletest//:gtest", ], ) @@ -268,6 +281,7 @@ cc_test( "//absl/base:config", "//absl/base:exception_safety_testing", "//absl/memory", + "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], ) @@ -293,6 +307,7 @@ cc_test( deps = [ ":compare", "//absl/base", + "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], ) |