Repository navigation
rust: strip the execroot from clang-cl build-script C objects on Windows (part of #14231) - #14574
TrapsterDK wants to merge 2 commits into
Conversation
|
/evidence platforms=["windows_x86_64"] task=build relocate=true scope=//rust/private/quality/tools:topiary Generated by Claude Code |
|
Evidence started on |
|
Evidence run 44951983531 (windows_x86_64, topiary, Generated by Claude Code |
|
CI on this draft is red in Generated by Claude Code |
|
/evidence platforms=["windows_x86_64"] task=build relocate=true scope=//rust/private/quality/tools:topiary Generated by Claude Code |
|
Evidence started on |
cc-rs objects built by Rust build scripts on Windows kept absolute execroot paths, because DX_BS_CFLAGS was empty for every MSVC target. When the C compiler is clang-cl, pass -ffile-prefix-map through /clang:. cl.exe still gets no flag. evidence.yml passes Bazel's Windows path to determinism_check so the Windows determinism evidence can run. Part of #14231. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hzcDgHHKbaNne5nvNy
--keep <dir> copies each output whose digest differs from both output bases' exec roots, so a run on a host we cannot reach (macOS, Windows) shows which file differs. evidence.yml keeps them in the artifact under determinism/. Part of #14231. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hyWgXAuKZTkQf9BoEE
36a2526 to
097ec70
Compare
|
Rebased onto main 5bf6454. Conflict in The
Fixing (2) takes an archiver step that gets relative member names. That is new work, so this PR stays draft. 🤖 Generated with Claude Code |
|
Shards 4, 5 and 25 on 097ec70 fail only tests that also fail on main:
I ran Generated by Claude Code |
|
Shard 3 on 097ec70 fails only Generated by Claude Code |
|
Shard 26 on 097ec70 fails Generated by Claude Code |
|
Shard 14 on 097ec70 fails only Generated by Claude Code |
|
Shard 24 on 097ec70 hit its 1380s budget, with 32 of 150 tests run. One test failed: Generated by Claude Code |
|
Shard 15 on 097ec70 also hit its 1380s budget: 29 of 150 tests ran, all passed. Shards 15 and 24 both timing out here, while #14589's shard 15 finished on the same base, points at this PR. The Generated by Claude Code |
Part of #14231.
On Windows,
DX_BS_CFLAGSwas empty for every MSVC target. So the C objects that cc-rs builds in Rust build scripts (tree-sitter, tree-sitter-ocaml) kept absolute execroot paths, and theirCargoBuildScriptRunoutputs differed between output bases (evidence run 44824310234).rust/private/build_script_cc_env.bzl: newbuild_script_cflags(msvc, clang_cl, coverage). It passes/clang:-ffile-prefix-map=${pwd}=.when the target C compiler is clang-cl, and nothing to cl.exe. Coverage still adds/U_CRT_STDIO_ISO_WIDE_SPECIFIERS. Linux and macOS flags are unchanged.rust/tests/defs_tests.bzl: checks the four flag cases..github/workflows/evidence.yml:relocate=true task=buildpassescygpath -wBazel todeterminism_checkon Windows, the same change as in release-tools: run the tools determinism check on every host (part of #14231) #14269, so the Windows evidence below can run.tools/testing/determinism_check.rs: new--keep <dir>copies every differing output of both builds to<dir>/firstand<dir>/second.evidence.ymlpasses--keep "$RUNNER_TEMP/evidence/determinism", so the artifact holds the two_bs.out_dirtrees. Evidence run 44951983531 still showed the tree-sitterout_dirdiffs, and these trees are needed to find which file differs..github/workflows/README.mddocuments it.The toolchain's target
CFLAGSalready carry/Breproand/clang:-gno-codeview-command-line(Windows cross aquery of@dx_quality_crates//:tree-sitter-ocaml), so object timestamps and the CodeView command line are ruled out.Not in this PR: the Windows Rust link (PDB temp dir and output base) and the macOS topiary diff. Both are still open on #14231, so the Windows determinism run will still list the Rustc link actions.
Tested:
//rust/tests:wrapper_registry_tests,//tools/testing:determinism_check_test,//tools/ci:evidence_inputs_test,//tools/ci:workflow_files_testpassed;@dx_quality_crates//:tree-sitter-ocamlbuilds on Linux.tools/dx check --applyon the touched files: format clean. The only lint findings are on older lines ofdeterminism_check.rs(indexing_slicingandmap_err_ignoreinparse_shard,label_kindsandentry_points). Windows evidence with--keepis requested below. The PR stays draft until theout_dirdiff is understood.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hzcDgHHKbaNne5nvNy