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

Geoffrey Martin-Noble via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 18:30:32 PST 2023


GMNGeoffrey added a comment.

Well I just spent quite a while fiddling with the zlib setup and didn't come up with something better than disabling layering check on Support. The issue is that we want the zlib rule to add in LLVM's define as well (at least as currently configured). Otherwise we could do an alias or `cc_import` rule. The latter might even be nicer for system zlib than the current hardcoding of linkopts, which I think is unfriendly to Windows. Trying to create a header to re-export the zlib header doesn't work because it needs to be called "zlib.h" and then it just recursively includes itself. I'm annoyed (but not that shocked) that Bazel doesn't have a way to declare a header re-exported from the build rule. I think a better solution than disabling layering would involve reworking the way we do configurable dependencies here in general.


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