This is an archive of the discontinued LLVM Phabricator instance.

[Bazel] Enable layering_check for MLIR build
ClosedPublic

Authored by GMNGeoffrey on Nov 15 2021, 3:46 PM.

Details

Summary

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.

Diff Detail