Skip to content

Commit

Permalink
Windows-specific filegroup to capture envoy-static.pdb output file fr…
Browse files Browse the repository at this point in the history
…om opt build (#16043)

Signed-off-by: William A Rowe Jr <wrowe@vmware.com>
Co-authored-by: Yan Avlasov <yavlasov@google.com>
  • Loading branch information
wrowe and yanavlasov authored Oct 12, 2021
1 parent 3954739 commit 6252a1e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.0
4.2.1
4 changes: 3 additions & 1 deletion bazel/envoy_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def envoy_cc_binary(
stamped = False,
deps = [],
linkopts = [],
tags = []):
tags = [],
features = []):
if not linkopts:
linkopts = _envoy_linkopts()
if stamped:
Expand All @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion ci/windows_ci_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions source/exe/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)
Expand Down

0 comments on commit 6252a1e

Please sign in to comment.