From 931c5304ef1cf55439fd02055658a8b92d568c99 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Thu, 2 Sep 2021 10:08:58 -0700 Subject: [PATCH] bazel: switch to zlib-ng by default First step of: https://github.com/envoyproxy/envoy/issues/13261 Signed-off-by: Keith Smiley --- bazel/BUILD | 4 ++-- bazel/README.md | 3 +-- bazel/foreign_cc/BUILD | 4 ++-- ci/do_ci.sh | 2 +- .../arch_overview/other_features/compression/libraries.rst | 4 ++-- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/bazel/BUILD b/bazel/BUILD index 016482a577f3..41067281297b 100644 --- a/bazel/BUILD +++ b/bazel/BUILD @@ -388,11 +388,11 @@ config_setting( ) config_setting( - name = "zlib_ng", + name = "zlib_original", constraint_values = [ "@bazel_tools//platforms:linux", ], - values = {"define": "zlib=ng"}, + values = {"define": "zlib=original"}, ) # TODO: consider converting WAVM VM support to an extension (https://github.com/envoyproxy/envoy/issues/12574) diff --git a/bazel/README.md b/bazel/README.md index cf575fa58c19..8c934ea4af7e 100644 --- a/bazel/README.md +++ b/bazel/README.md @@ -661,8 +661,7 @@ The following optional features can be enabled on the Bazel build command-line: * Process logging for Android applications can be enabled with `--define logger=android`. * Excluding assertions for known issues with `--define disable_known_issue_asserts=true`. A KNOWN_ISSUE_ASSERT is an assertion that should pass (like all assertions), but sometimes fails for some as-yet unidentified or unresolved reason. Because it is known to potentially fail, it can be compiled out even when DEBUG is true, when this flag is set. This allows Envoy to be run in production with assertions generally enabled, without crashing for known issues. KNOWN_ISSUE_ASSERT should only be used for newly-discovered issues that represent benign violations of expectations. -* Envoy can be linked to [`zlib-ng`](https://github.com/zlib-ng/zlib-ng) instead of - [`zlib`](https://zlib.net) with `--define zlib=ng`. +* Envoy can be linked to [`zlib`](https://zlib.net) instead of [`zlib-ng`](https://github.com/zlib-ng/zlib-ng) with `--define zlib=original`. ## Enabling and disabling extensions diff --git a/bazel/foreign_cc/BUILD b/bazel/foreign_cc/BUILD index 2c9b481282cb..21c481a00b96 100644 --- a/bazel/foreign_cc/BUILD +++ b/bazel/foreign_cc/BUILD @@ -433,8 +433,8 @@ envoy_cmake_external( "UNALIGNED_OK": "off", }, lib_source = select({ - "//bazel:zlib_ng": "@com_github_zlib_ng_zlib_ng//:all", - "//conditions:default": "@net_zlib//:all", + "//bazel:zlib_original": "@net_zlib//:all", + "//conditions:default": "@com_github_zlib_ng_zlib_ng//:all", }), static_libraries = select({ "//bazel:windows_x86_64": ["zlib.lib"], diff --git a/ci/do_ci.sh b/ci/do_ci.sh index d507d36993da..cd515034f6bb 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -324,7 +324,7 @@ elif [[ "$CI_TARGET" == "bazel.compile_time_options" ]]; then "--define" "path_normalization_by_default=true" "--define" "deprecated_features=disabled" "--define" "tcmalloc=gperftools" - "--define" "zlib=ng" + "--define" "zlib=original" "--@envoy//bazel:http3=False" "--@envoy//source/extensions/filters/http/kill_request:enabled" "--test_env=ENVOY_HAS_EXTRA_EXTENSIONS=true") diff --git a/docs/root/intro/arch_overview/other_features/compression/libraries.rst b/docs/root/intro/arch_overview/other_features/compression/libraries.rst index c6dbe69991aa..b3a05def9f37 100644 --- a/docs/root/intro/arch_overview/other_features/compression/libraries.rst +++ b/docs/root/intro/arch_overview/other_features/compression/libraries.rst @@ -14,7 +14,7 @@ libraries. `zlib-ng `_ is a fork that hosts several 3rd-party contributions containing new optimizations. Those optimizations are considered useful for `improving compression performance `_. - Envoy can be built to use `zlib-ng `_ instead of regular - `zlib `_ by using ``--define zlib=ng`` Bazel option. The relevant build options + Envoy builds with `zlib-ng `_ by default, but can still use regular + `zlib `_ by using ``--define zlib=original`` Bazel option. The relevant build options used to build `zlib-ng `_ can be evaluated in :repo:`here `. Currently, this option is only available on Linux.