From 143e983739333ce4b30320d26bce8594bd24b5f3 Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Tue, 10 Oct 2023 13:29:16 -0700 Subject: 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 --- absl/profiling/BUILD.bazel | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'absl/profiling/BUILD.bazel') diff --git a/absl/profiling/BUILD.bazel b/absl/profiling/BUILD.bazel index 3392c96c..46c973b0 100644 --- a/absl/profiling/BUILD.bazel +++ b/absl/profiling/BUILD.bazel @@ -19,7 +19,13 @@ load( "ABSL_TEST_COPTS", ) -package(default_visibility = ["//visibility:private"]) +package( + default_visibility = ["//visibility:private"], + features = [ + "layering_check", + "parse_headers", + ], +) licenses(["notice"]) @@ -52,6 +58,7 @@ cc_test( "//absl/synchronization", "//absl/synchronization:thread_pool", "//absl/time", + "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], ) @@ -80,6 +87,7 @@ cc_test( deps = [ ":exponential_biased", "//absl/strings", + "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], ) @@ -109,6 +117,7 @@ cc_test( deps = [ ":periodic_sampler", "//absl/base:core_headers", + "@com_google_googletest//:gtest", "@com_google_googletest//:gtest_main", ], ) -- cgit v1.2.3