diff --git a/.bazelversion b/.bazelversion index ee74734aa225..fae6e3d04b2c 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -4.1.0 +4.2.1 diff --git a/bazel/envoy_binary.bzl b/bazel/envoy_binary.bzl index 6ea24b9888cf..d7a17c2ff615 100644 --- a/bazel/envoy_binary.bzl +++ b/bazel/envoy_binary.bzl @@ -22,7 +22,8 @@ def envoy_cc_binary( stamped = False, deps = [], linkopts = [], - tags = []): + tags = [], + features = []): if not linkopts: linkopts = _envoy_linkopts() if stamped: @@ -42,6 +43,7 @@ def envoy_cc_binary( stamp = 1, deps = deps, tags = tags, + features = features, ) # Select the given values if exporting is enabled in the current build. diff --git a/ci/windows_ci_steps.sh b/ci/windows_ci_steps.sh index eed32c121886..110535e63576 100755 --- a/ci/windows_ci_steps.sh +++ b/ci/windows_ci_steps.sh @@ -91,11 +91,13 @@ fi if [[ $BUILD_ENVOY_STATIC -eq 1 ]]; then bazel "${BAZEL_STARTUP_OPTIONS[@]}" build "${BAZEL_BUILD_OPTIONS[@]}" //source/exe:envoy-static - # Copy binary to delivery directory + # Copy binary and pdb to delivery directory cp -f bazel-bin/source/exe/envoy-static.exe "${ENVOY_DELIVERY_DIR}/envoy.exe" + cp -f bazel-bin/source/exe/envoy-static.pdb "${ENVOY_DELIVERY_DIR}/envoy.pdb" # Copy for azp, creating a tar archive tar czf "${ENVOY_BUILD_DIR}"/envoy_binary.tar.gz -C "${ENVOY_DELIVERY_DIR}" envoy.exe + tar czf "${ENVOY_BUILD_DIR}"/envoy_binary_debug.tar.gz -C "${ENVOY_DELIVERY_DIR}" envoy.exe envoy.pdb fi # Test invocations of known-working tests on Windows diff --git a/source/exe/BUILD b/source/exe/BUILD index f3fb551eb83a..0eb4078c164c 100644 --- a/source/exe/BUILD +++ b/source/exe/BUILD @@ -22,6 +22,10 @@ alias( envoy_cc_binary( name = "envoy-static", + features = select({ + "//bazel:windows_opt_build": ["generate_pdb_file"], + "//conditions:default": [], + }), stamped = True, deps = [":envoy_main_entry_lib"], )