[PATCH] D143320: [bazel] Rework zlib dependency

Aaron Siddhartha Mondal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 4 07:13:57 PST 2023


aaronmondal created this revision.
aaronmondal added reviewers: MaskRay, GMNGeoffrey, rupprecht.
aaronmondal added a project: bazel build.
Herald added a project: All.
aaronmondal requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Removes the wrapper logic for zlib in the bazel build and introduces new logic
to handle `LLVM_ENABLE_ZLIB`.

Removes the `BAZEL_LLVM_ZLIB_STRATEGY` environment variable and instead introduces
a boolean `-- at llvm_zlib//:llvm_enable_zlib` flag which defaults to true.

To migrate:

- The previous "external" strategy is the default. May be explicitly enabled with `-- at llvm_zlib//:llvm_enable_zlib=true`. For custom zlib variants you can use the BUILD file at `third_party_build/zlib.BUILD` as reference and adjust the `@llvm_zlib` archive in the `WORKSPACE` directly.
- The previous "disable" strategy may be enabled with `-- at llvm_zlib//:llvm_enable_zlib=false`.
- The previous "system" strategy has been removed since it breaks hermeticity.

Fixes breakages of downstream projects using upstream clang and the previously
"external" zlib strategy (D141553 <https://reviews.llvm.org/D141553>).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143320

Files:
  utils/bazel/WORKSPACE
  utils/bazel/configure.bzl
  utils/bazel/deps_impl/zlib_disable.BUILD
  utils/bazel/deps_impl/zlib_external.BUILD
  utils/bazel/deps_impl/zlib_system.BUILD
  utils/bazel/third_party_build/zlib.BUILD
  utils/bazel/zlib.bzl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143320.494819.patch
Type: text/x-patch
Size: 10947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230204/8ca25483/attachment.bin>


More information about the llvm-commits mailing list