-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Windows-specific filegroup to capture envoy-static.pdb output file from opt build #16043
Conversation
Lots of tests yet to complete - offering this up to @envoyproxy/windows-dev for early access |
/assign-from @envoyproxy/windows-dev |
@envoyproxy/windows-dev assignee is @sunjayBhatia |
Pleased to report this succeeds agnostically in dbg and fastbuild builds (where pdb is captured) as well as opt (where pdb is discarded by default.) @davinci26 I see you are also working on images and mentioned azure, so please have a look. In terms of distinct packages from Windows for only the .exe, or combo .exe+.pdb, I am wondering whether .zip files make more sense for distribution (as Extract-Archive is baked in to PowerShell), but that can even be a separate discussion, this workaround mentioned in bazelbuild/rules_cc#94 solves (and could be documented, at the bazel project.) |
Looks like theres still an issue with getting the .exe output with this change: https://dev.azure.com/cncf/envoy/_build/results?buildId=72410&view=logs&j=b840a642-5ff3-5357-2e4b-e06e40b0cffd&t=67965174-5100-5631-9dc0-68b9f0aacb53&l=903 |
Let's try stacking cc_binary+filegroup, since there appears to be no way to solve this in a single filegroup, especially without confusing build source refs. |
No behaviors working as-expected, I've re-escalated to bazel team. |
Strike my previous report. We are not going to be able to trust local builds, as we work out the right fix, we will have to bump through 6 CI passes (fastbuild dbg opt against msvc, clang-cl) before declaring it resolved. |
The dbg build fails in a predictable ways (Release - msvc / clang-cl);
The fastbuild build fails similarly (Release - msvc / clang-cl);
The code is expected to behave differently when not optimized, but the .exe and .pdb files were both emitted in all cases, so this workaround is confirmed to not be disruptive. Reverting to opt for review. |
Can't take this any further, we will have to rebuild the toolchains, and must have a tag on bazel inclusive of this change... so it's on pause. |
The bazel fix has made it into 5.0.0-pre.20210510.2 (and .2.2) but did not make it into 4.1.0 and is not yet present in a 4.1.x candidate, if one is eventually created. |
This continues to be blocked on bazel release 4.2 for commit bazelbuild/bazel@6dc941e and needs a corresponding rules_cc bump. |
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Signed-off-by: Yan Avlasov <[email protected]>
Signed-off-by: Yan Avlasov <[email protected]>
Signed-off-by: Yan Avlasov <[email protected]>
…tput See bazelbuild/rules_cc#94 for details Use generate_pdb_file feature to capture pdb from envoy-static.exe - Introduces features list arg to envoy_cc_binary - Toggles the feature only for the windows opt case in the envoy-static target - Capture the resulting envoy-static.pdb output Signed-off-by: William A Rowe Jr <[email protected]>
Drops clang-cl which is presently broken Signed-off-by: William A Rowe Jr <[email protected]>
With the updated bazel-toolchain images provisioned and bazel 4.2.1 out, this is now ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for driving this across so many layers. One small question
I have approved so I will defer to @lizan for the final review/merge |
This could be merged but since its windows PR, I would also like one reviewer outside of the windows devs. Lizan is OOO for KubeCon this week. /assign-from @envoyproxy/senior-maintainers (edit: after my trick failed, I assigned it to Matt) |
@envoyproxy/senior-maintainers assignee is @lizan |
Commit Message: Windows-specific filegroup to capture envoy-static.pdb output file from opt build
Additional Description:
See bazelbuild/rules_cc#94 for details
Signed-off-by: William A Rowe Jr [email protected]
Risk Level: low
Testing: local msvc + clang-cl in process across opt/dbg/fastbuild
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: Windows target only