build(tools): llvm-mingw's Windows tool keeps llvm-ar and its x86-64 drivers #2963
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2963
Loading…
Reference in a new issue
No description provided.
Delete branch "neotoxic/Longshot:build/llvm-mingw-llvm-ar"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The pin half of a tool bump (docs/dev/reference/releases.md, "Bumping a tool"): tools.lock's trimmed llvm-mingw for Windows keeps
llvm-ar.exeand llvm-mingw's two x86-64 drivers (x86_64-w64-mingw32-clang.exe,x86_64-w64-mingw32-clang++.exe), andLLVM_MINGW_TRIMgoes to 2, a new package version (a version's files never change).Why: the trimmed llvm-mingw has no archiver. A developer's game build on Windows archives the game's Rust's C, C++ and CMake objects (shaderc's among them, whose paths pass 260 characters) with whatever
arthe PC has: none on a clean PC, or MinGW's, which cannot open those paths. #2961 hands the toolchain'sllvm-arto cargo and CMake when there is one, and for now names rustup'sllvm-toolsin setup.md.llvm-ar.exeloadslibLLVM-<n>.dll, which the trim keeps already.The drivers:
scripts/longshot_builder.py's Windows build namesx86_64-w64-mingw32-clang.exeas its linker and C compiler andx86_64-w64-mingw32-clang++.exeas its C++ one, in the llvm-mingw it is given. A build from source on Windows (the launcher's, #2961) gives it the source tools' trimmed llvm-mingw, which hasclang.exeandclang++.exeonly, so the builder could not be made. They are llvm-mingw's small drivers (14 KB each, runningclang-<n>.exeasclang.exedoes).Read first:
builder/tools/windows-x64/llvm-mingw.sh(trim_llvm_mingw),builder/tools/pins.sh.Once tools.lock names the new version, a player's from-source build on Windows changes too:
from_source::archiverfindstools/llvm-mingw/bin/llvm-ar.exe, so RenHDrum is compiled from the source instead ofrenhdrum_not_built(the running builder's library). docs/dev/reference/build.md's "with none (a Steam Deck, Windows)" then goes stale: that line changes with tools.lock's line, in the third pull request.See #2961.
Testing
Tested: the recipe itself not yet: it runs in Ubuntu 22.04 (
builder/tools/docker.shor the Check tools workflow), which this Windows PC does not have. Its files, on Windows 11 (the three added by hand from llvm-mingw 20261104's UCRT x86-64 release to tools.lock's20261104-x64-1):scripts/longshot_builder.py build --target windows --profile releasewith that llvm-mingw asLONGSHOT_MINGW: the builder is made (the drivers as linker, CC and CXX).from-source --archiveof #2961's head under the launcher's data folder, with that llvm-mingw as the source tools' and MinGW'sarfirst on the PATH: done in 349 s; shaderc's CMake tooktools/llvm-mingw/bin/llvm-ar.exe(its toolchain file); RenHDrum built from the source (renhdrum.dll, norenhdrum_not_built); the version'sLongshot.exeanswers--version.Still to test:
windows-x64/llvm-mingw, expecting the archive made the same twice,bin/llvm-ar.exeand the twobin/x86_64-w64-mingw32-clang*.exein it, a new version20261104-x64-2(by hand: someone with write access dispatchestools-check.yml).tools.lock(make.sh'sadd.sh):tools\llvm-mingw\bin\llvm-ar.exe --versionruns;dev.py rtthendev.py smokewith no otherllvm-aron the PATH, expecting PASS (by hand).longshot-builder build --source ...): RenHDrum compiled, norenhdrum_not_builtwarning (by hand).Measurements
Nothing to measure: a build tool's archive gains one small program; the game is built as before.
Risks
llvm-ar.exeand the two drivers (small programs over the DLL andclang-<n>.exeit already carries).Checklist
Ready for review
mod-api; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). Not run for this branch: it changes two shell recipes, whichtests/test_tools_pins.pychecks on Linux (CI).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened.tests/test_tools_pins.pyreadspins.sh; nothing in it needs a change (CI runs it).Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
aa349bcec1e73c622eb0WIP: build(tools): llvm-mingw's Windows tool keeps llvm-arto WIP: build(tools): llvm-mingw's Windows tool keeps llvm-ar and its x86-64 drivers@review
Recommendation: Request changes. The recipe adds the files needed by Windows builds, but it has no game-free regression test for the missing archiver and drivers. The actual generated archive has also yet to be tested.
The next Windows llvm-mingw package will include llvm-ar and the two target-prefixed compiler drivers, allowing builds to use the intended tools. The current tools.lock still selects the old package, as expected for the first stage of the documented tool-bump process.
Blocking (1): must change before merging.
builder/tools/windows-x64/llvm-mingw.sh:21: This fix has no game-free regression test for the files the trimmed package must retain. (more on the line) Do: Add a game-free test that exercises the trim on an authored fixture and checks that all three tools are retained; it should fail against the base recipe.Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
builder/tools/windows-x64/llvm-mingw.sh:21: The recipe-produced package has not yet been exercised. (more on the line) Do: Run the documented Check tools workflow, then install its archive on Windows and exercise llvm-ar, the developer build and a from-source build as described in Still to test.@fixcan do L1.More: does it help, other systems, switches, what was read
Does it help: Unproven for the recipe: the author reports a successful Windows builder and from-source build using files added by hand, but has not made or tested the archive produced by this change.
Other systems: The recipe produces the Windows x64 tool package; Linux builds and game runtime code are unchanged. Once tools.lock selects the new package, Windows from-source builds can compile RenHDrum from source, which still needs verification with the generated archive.
Switches: None.
Reviewed:
228d482d00against1e8153d50d: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, both changed files and their full diff, the commit messages, the tool-bump procedure, make.sh, the relevant tool-pin tests and the Check tools workflow. Skimmed tool consumers and related search results. docs/review-checklist.md and ../Tooling/AGENTS.md were absent. No recorded runs, translations or generated files changed.; nothing run (a code review).Checked and fine:
Testing: No commands from the project or tests were run, as requested. The author reports Windows testing with manually added files; the recipe and generated archive remain untested.
Overlaps and merge order: The description identifies #2961 as related; its contents were not available for review.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -16,3 +20,2 @@rm -rf "$out" && mkdir -p "$out/bin" "$out/x86_64-w64-mingw32" "$out/lib/clang/$major/lib/windows"for f in clang.exe clang++.exe "clang-$major.exe" ld.lld.exe "libLLVM-$major.dll" libclang-cpp.dll libc++.dll \libunwind.dll x86_64-w64-windows-gnu.cfg x86_64-pc-windows-gnu.cfg mingw32-common.cfg; dofor f in clang.exe clang++.exe x86_64-w64-mingw32-clang.exe x86_64-w64-mingw32-clang++.exe "clang-$major.exe" \L1 (blocking): This fix has no game-free regression test for the files the trimmed package must retain.
When: If llvm-ar or either target-prefixed driver is removed from this copy list later, the existing pin tests still pass, but the resulting Windows package again lacks a tool needed by the build.
Do: Add a game-free test that exercises the trim on an authored fixture and checks that all three tools are retained; it should fail against the base recipe.
L2 (should fix): The recipe-produced package has not yet been exercised.
When: The reported Windows builds used files inserted by hand, so they do not show that this recipe produces a usable archive with the required files and dependencies.
Do: Run the documented Check tools workflow, then install its archive on Windows and exercise llvm-ar, the developer build and a from-source build as described in Still to test.
WIP: build(tools): llvm-mingw's Windows tool keeps llvm-ar and its x86-64 driversto build(tools): llvm-mingw's Windows tool keeps llvm-ar and its x86-64 drivers