[PATCH] D113952: [Bazel] Enable layering_check for MLIR build

Geoffrey Martin-Noble via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 15:46:09 PST 2021


GMNGeoffrey created this revision.
Herald added subscribers: sdasgup3, wenzhicui, wrengr, Chia-hungDuan, dcaballe, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini.
GMNGeoffrey requested review of this revision.
Herald added subscribers: llvm-commits, stephenneuendorffer, nicolasvasilache.
Herald added a project: LLVM.

This feature checks that headers included by a file are provided by a
header exported by one of the direct dependencies of the build rule in
which it is contained. It ensures that appropriate layering (a goal of
the LLVM project) is preserved. So far, I'm only adding this to MLIR
because we've had it turned on internally since the beginning, so MLIR
is already layering clean. It would be nice to also enable it for LLVM,
but that requires some additional cleanup.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113952

Files:
  utils/bazel/llvm-project-overlay/mlir/BUILD.bazel


Index: utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
===================================================================
--- utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -16,6 +16,7 @@
 
 package(
     default_visibility = ["//visibility:public"],
+    features = ["layering_check"],
     licenses = ["notice"],
 )
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113952.387429.patch
Type: text/x-patch
Size: 383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211115/cc9ad1da/attachment.bin>


More information about the llvm-commits mailing list