Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel: switch to zlib-ng by default #17968

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions bazel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions bazel/foreign_cc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
2 changes: 1 addition & 1 deletion ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ libraries.
`zlib-ng <https://github.com/zlib-ng/zlib-ng>`_ is a fork that hosts several 3rd-party
contributions containing new optimizations. Those optimizations are considered useful for
`improving compression performance <https://github.com/envoyproxy/envoy/issues/8448#issuecomment-667152013>`_.
Envoy can be built to use `zlib-ng <https://github.com/zlib-ng/zlib-ng>`_ instead of regular
`zlib <http://zlib.net>`_ by using ``--define zlib=ng`` Bazel option. The relevant build options
Envoy builds with `zlib-ng <https://github.com/zlib-ng/zlib-ng>`_ by default, but can still use regular
`zlib <http://zlib.net>`_ by using ``--define zlib=original`` Bazel option. The relevant build options
used to build `zlib-ng <https://github.com/zlib-ng/zlib-ng>`_ can be evaluated in :repo:`here
<bazel/foreign_cc/BUILD>`. Currently, this option is only available on Linux.