Enable building Windows message tables on Linux hosts too #58987
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 225 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.324
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #58987"
general
weight: 0.35
dd-gplassard
What does this PR do?
Pick Windows resource compilers through a toolchain resolved per exec platform, so that they cannot disagree and an unsupported exec platform fails analysis:
windmcandwindresstay on Windows,wmcand LLVM'swindresserve Linux x86_64.Add
//:llvm, LLVM's multicall binary, which the Linux toolchain runs asllvm windresandllvm clang.Provide the hermetic LLVM C toolchain for Windows targets on Linux hosts too, to archive the resulting objects, WinLibs' remaining the one on Windows hosts.
Move the rules to
//bazel/rules/windows:resources.bzl, next to their toolchains.Motivation
win_messagetablecould only build on Windows hosts, so targets linking message tables, like//pkg/util/winutil/messagestrings, couldn't be built from Linux.Extending that support to Linux lets CI jobs, like #58906's e2e ones, prepare the Windows test binaries that link them.
Describe how you validated your changes
win_resourceand 2win_messagetableobjects built natively on a Windows VM were byte-identical tomain's,//pkg/util/winutil/messagestringsthen built for Windows too.Additional Notes
LLVM's
windreswrites.rsrc$01and.rsrc$02sections, ascvtres.exedoes, but GNUldonly merges input sections named.rsrc.Linking such an object next to another resource object therefore either fails, as
windows_msi_and_bosh_zip_x64-a7did onsecurity-agent.exe(https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/2180573019), or silently keeps the first resource tree only.=> keeping GNU
windreson Windows, and Linux-built binaries linking a single resource object, like #58906's test binaries.