Skip to content

Commit

Permalink
Fixed bazel configuration ambiguity for non HTTP3 builds
Browse files Browse the repository at this point in the history
My first commit didn't really fix anything.
This commit completes the fix.

Signed-off-by: Ted Poole <tpoole@redhat.com>
  • Loading branch information
tedjpoole committed Jun 4, 2024
1 parent d910a0e commit 791b1f6
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 4 deletions.
42 changes: 42 additions & 0 deletions bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,48 @@ selects.config_setting_group(
],
)

bool_flag(
name = "always_true_flag",
build_setting_default = True,
visibility = ["//visibility:private"],
)

bool_flag(
name = "always_false_flag",
build_setting_default = False,
visibility = ["//visibility:private"],
)

# Alias equal to "not(":disable_http3")" (if "not()" existed).
alias(
name = "enable_http3_setting",
actual = select({
":disable_http3": ":always_false_flag",
"//conditions:default": ":always_true_flag",
}),
)

config_setting(
name = "enable_http3",
flag_values = {":enable_http3_setting": "True"},
)

selects.config_setting_group(
name = "enable_http3_on_linux_ppc",
match_all = [
":enable_http3",
":linux_ppc",
],
)

selects.config_setting_group(
name = "enable_http3_on_windows_x86_64",
match_all = [
":enable_http3",
":windows_x86_64",
],
)

config_setting(
name = "disable_admin_html",
values = {"define": "admin_html=disabled"},
Expand Down
4 changes: 2 additions & 2 deletions source/exe/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ envoy_cc_library(
"//source/server:options_base",
"//source/server:server_base_lib",
] + select({
"//bazel:windows_x86_64": envoy_all_extensions(WINDOWS_SKIP_TARGETS),
"//bazel:linux_ppc": envoy_all_extensions(PPC_SKIP_TARGETS),
"//bazel:enable_http3_on_windows_x86_64": envoy_all_extensions(WINDOWS_SKIP_TARGETS),
"//bazel:enable_http3_on_linux_ppc": envoy_all_extensions(PPC_SKIP_TARGETS),
"//bazel:disable_http3_on_windows_x86_64": envoy_all_extensions(NO_HTTP3_SKIP_TARGETS + WINDOWS_SKIP_TARGETS),
"//bazel:disable_http3_on_linux_ppc": envoy_all_extensions(NO_HTTP3_SKIP_TARGETS + PPC_SKIP_TARGETS),
"//conditions:default": envoy_all_extensions(),
Expand Down
4 changes: 2 additions & 2 deletions test/config_test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ envoy_cc_test_library(
"//test/test_common:simulated_time_system_lib",
"//test/test_common:threadsafe_singleton_injector_lib",
] + select({
"//bazel:windows_x86_64": envoy_all_extensions(WINDOWS_SKIP_TARGETS),
"//bazel:linux_ppc": envoy_all_extensions(PPC_SKIP_TARGETS),
"//bazel:enable_http3_on_windows_x86_64": envoy_all_extensions(WINDOWS_SKIP_TARGETS),
"//bazel:enable_http3_on_linux_ppc": envoy_all_extensions(PPC_SKIP_TARGETS),
"//bazel:disable_http3_on_windows_x86_64": envoy_all_extensions(NO_HTTP3_SKIP_TARGETS + WINDOWS_SKIP_TARGETS),
"//bazel:disable_http3_on_linux_ppc": envoy_all_extensions(NO_HTTP3_SKIP_TARGETS + PPC_SKIP_TARGETS),
"//conditions:default": envoy_all_extensions(),
Expand Down

0 comments on commit 791b1f6

Please sign in to comment.