[all-commits] [llvm/llvm-project] a26812: [bazel] Rework zlib dependency
Aaron Siddhartha Mondal via All-commits
all-commits at lists.llvm.org
Fri May 19 14:43:06 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a268127736e4d703cef8c9f4841f9a8e8ac21ba7
https://github.com/llvm/llvm-project/commit/a268127736e4d703cef8c9f4841f9a8e8ac21ba7
Author: Aaron Siddhartha Mondal <aaron at eomii.org>
Date: 2023-05-19 (Fri, 19 May 2023)
Changed paths:
M utils/bazel/WORKSPACE
M utils/bazel/configure.bzl
R utils/bazel/deps_impl/zlib_disable.BUILD
R utils/bazel/deps_impl/zlib_external.BUILD
R utils/bazel/deps_impl/zlib_system.BUILD
M utils/bazel/llvm-project-overlay/lld/BUILD.bazel
A utils/bazel/third_party_build/zlib-ng.BUILD
R utils/bazel/third_party_build/zlib.BUILD
R utils/bazel/zlib.bzl
Log Message:
-----------
[bazel] Rework zlib dependency
Switches the library to use the zlib-ng implementation since the
original implementation is warning-incompatible with recent versions of clang.
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. If you need the "system" setup, use the "external"
strategy and override the zlib dependency.
Addresses breakages of downstream projects using upstream clang and the
previously "external" zlib strategy (D141553).
Reviewed By: MaskRay, GMNGeoffrey
Differential Revision: https://reviews.llvm.org/D143320
More information about the All-commits
mailing list