[PATCH] D141553: [bazel] Enable layering_check for llvm and clang
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 11 16:03:13 PST 2023
MaskRay created this revision.
MaskRay added reviewers: GMNGeoffrey, rupprecht.
Herald added subscribers: bzcheeseman, rriddle.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added subscribers: llvm-commits, stephenneuendorffer.
Herald added a project: LLVM.
Similar to D113952 <https://reviews.llvm.org/D113952> for mlir.
I have added many missing dependencies so that
`bazel-5.0.0 build --config=generic_clang --features=layering_check @llvm-project//llvm:all @llvm-project//clang:all`
work now.
Enable the feature to ensure layering and catch circular dependencies
(https://llvm.org/docs/CodingStandards.html#library-layering).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141553
Files:
utils/bazel/llvm-project-overlay/clang/BUILD.bazel
utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
Index: utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
===================================================================
--- utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+++ utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
@@ -10,7 +10,10 @@
load(":enum_targets_gen.bzl", "enum_targets_gen")
load(":binary_alias.bzl", "binary_alias")
-package(default_visibility = ["//visibility:public"])
+package(
+ default_visibility = ["//visibility:public"],
+ features = ["layering_check"],
+)
licenses(["notice"])
Index: utils/bazel/llvm-project-overlay/clang/BUILD.bazel
===================================================================
--- utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+++ utils/bazel/llvm-project-overlay/clang/BUILD.bazel
@@ -9,6 +9,7 @@
package(
default_visibility = ["//visibility:public"],
+ features = ["layering_check"],
)
licenses(["notice"])
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141553.488413.patch
Type: text/x-patch
Size: 904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230112/545c1ddb/attachment.bin>
More information about the llvm-commits
mailing list