[PATCH] D141553: [bazel] Enable layering_check for llvm and clang

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 11:19:56 PST 2023


MaskRay added a comment.

In D141553#4067007 <https://reviews.llvm.org/D141553#4067007>, @GMNGeoffrey wrote:

> I'm seeing a bunch of layering failures when trying to integrate this into IREE. We're building with clang-16 which seems to have gotten much better at finding these issues (IIRC there used to be a bug that prevented this). I'm surprised Google hasn't hit this issue with the internal build as well, since I thought we were using a very new clang. Maybe we could use a newer clang in the Bazel build bot? Disadvantage is that it might stop working with an older Clang

Do you manage to address the IREE issues? I don't recall a layering_check bug but before D132779 <https://reviews.llvm.org/D132779> the check was less strict (false negatives for some `textual_hdrs` uses: https://maskray.me/blog/2022-09-25-layering-check-with-clang#bazel)

In D141553#4074337 <https://reviews.llvm.org/D141553#4074337>, @shahms wrote:

> This breaks users of llvm_external_zlib because https://github.com/llvm/llvm-project/blob/main/utils/bazel/deps_impl/zlib_external.BUILD doesn't export the `zlib.h` header.

Do you have a build instruction? The fix is likely an addition of `features = ["-layering_check"],` somewhere.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141553/new/

https://reviews.llvm.org/D141553



More information about the llvm-commits mailing list