WIP: fix(builder): the release's builder links its C++ runtime in again: longshot_builder.py build's flags are whole #2824
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2824
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/mod-api-builder-flags"
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
For #2822 (into
mod-api).scripts/longshot_builder.py build, which makes the release's builder, adds glslang's C++ runtime to rustc's flags withflags += " -C link-arg=-l:libc++.a -C link-arg=-l:libc++abi.a"(Windows) andflags += " -C link-arg=-l:libstdc++.a"(Linux).flagsis a list since #2732, so the string goes in one character at a time:CARGO_ENCODED_RUSTFLAGSholds" ","-","C"," ","l", ... and the link-args never reach rustc as flags. This adds them as list items, like the rest of the function's flags.Read first:
cmd_buildinscripts/longshot_builder.py.Testing
Tested: Windows 11,
mise run test -- test_longshot_builder. The check now looks for the C++ runtime's link-args, each one whole, and asks that no flag is a single character. It fails onmod-api@eaf4a48b(['-C', 'link-arg=-l:libc++.a'] not found in [... [' ', '-'], ['-', 'C'] ...], the same on the Linux side with-l:libstdc++.a) and passes here.mise run lintpasses.Still to test:
scripts/longshot_builder.py build, expecting it to link with glslang's C++ runtime static and passcheck(by hand, a maintainer: it needs the pinned toolchain's download)Measurements
Verdict: fixed. The release's C++ runtime link-args reach rustc whole: the check fails on
mod-apiand passes here.Baseline:
mod-api(#2822's head), the branch this PR goes into: the bug is there, not onmain.Setup: Windows 11,
mise run test -- test_longshot_builder(its Windows and Linux cases, withlongshot_builder.py build's cargo run stood in). The game and a build's speed are not affected: only the flags change.eaf4a48ba96a9b63dtests/test_longshot_builder.py['-C', 'link-arg=-l:libc++.a'] not found(the flags' ','-','C', ... one character each)Risks
The sandbox: not touched. This is the release's build script for the builder: it links the builder's own C++ runtime in. What the builder confines, grants and serves to the game is the same code.
Only the release's
longshot_builder.py buildchanges: its C++ runtime flags now reach rustc. A revert is enough. Players notice nothing.Checklist
Ready for review
mod-api(#2822's head); the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (This check passes. The whole suite onmod-apihas Windows-only failures, which another PR intomod-apifixes.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here. (It fails onmod-api, where the bug is.)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
Measurements: the check's result before (mod-api @
9e6b9c57, fails) and after (50a0a697, passes), with a Baseline line, as standards.md's Measurements asks of a fix.50a0a6971777ec30c293Rebased onto mod-api's new squash
eaf4a48b(the same tree as9e6b9c57, which this branch was on): the diff is this PR's own commits again. The checks and runs above hold as they are (the tree under them is unchanged); the description's commits are the new ones.Risks now says how this change stands with the sandbox (what it touches, and why the confined game reaches nothing more).
77ec30c293d30e8cdd29Rebased onto mod-api's newest (
4cc50ca1: main's newest merged in), with no conflict; this PR's own checks were run again on the rebased head and pass as before. The merge touched none of this PR's files (#2827: only a comment in host/hos_main.c, far from its change), so the measurements and runs above hold; the After commit is the rebased head.d30e8cdd29d58044ad26Rebased onto
mod-api@816d2354(#2837, headless shots of the mods' UI), nowd58044ad. No conflict, and the diff is the same as before (samegit patch-id). #2837 touches none of this PR's files.d58044ad26daf95b29efdaf95b29ef3628cf9a97Rebased onto
mod-api@c5e5b676: it was re-squashed onto main @46291934(#2833) twice today (cdbb8551, thenc5e5b676), which made this PR show main's and the whole mod API's diff. Now3628cf9a, the same diff as before (samegit patch-id), no conflict. The changes underneath touch none of this PR's files, so its checks still hold.3628cf9a97d4fcd9d066Rebased onto
mod-api@537c2816(#2848, game-free checks' fixtures only), nowd4fcd9d0: the same diff (samegit patch-id), no conflict. #2848 touches none of this PR's files, so its checks still hold.d4fcd9d0666e7f327069Rebased onto mod-api
aea64d3a(#2745 nav.closest, one new commit):d4fcd9d0->6e7f3270, the same diff (git patch-id unchanged), so the checks and runs above still hold; none of this PR's files changed on mod-api. The description's head hash is updated.6e7f32706993c9fb516fRebased onto the new
mod-apicb37f5ab(#2851 native mouse camera, #2852 modding docs), which touch none of this PR's files: the same patch (same patch-id), head93c9fb51.93c9fb516f97708ddc4bRebased onto mod-api @
12f42db5(#2855 rustfmt of nav.closest, #2861 menu rows by place): head93c9fb516->97708ddc4, the same diff (patch-id unchanged); neither commit touches this PR's files.97708ddc4bddcbb36a43Rebased onto mod-api @
75bcd270(#2881 a mod adds a game language): head97708ddc4->ddcbb36a4, the same diff (patch-id unchanged); #2881 touches none of this PR's files.ddcbb36a43f09e93d68cRebased onto mod-api
af3e4d40(5 new commits on75bcd270): headf09e93d68, the same diff (patch-id unchanged). The new mod-api commits touch none of this PR's files.f09e93d68c15348c8153Rebased onto mod-api
716735d8(6 new commits on top ofaf3e4d40): headf09e93d68->15348c815, the same diff (git patch-id unchanged). The new mod-api touches files near this PR; its checks are to be rerun on this head.15348c815345338bf40aRebased onto mod-api
5780eeda(one new commit on716735d8, the reverse-engineering tools for hook sites): head15348c815->45338bf40, the same diff (git patch-id unchanged). The new mod-api commit touches files near this PR (the builder crates, Cargo, CI); its checks are to be rerun on this head before it leaves WIP.45338bf40a0f2f9967cdRebased onto mod-api
65148a78(one new commit, photo-mode and effects APIs), now at0f2f9967c: the same diff (git patch-id unchanged). Checks not rerun on this PC.0f2f9967cd38078934b0Rebased onto the re-squashed
mod-api041890bb(it now carries main up to #2926 and #2884): only this PR's own commits moved withgit rebase --onto, the diff unchanged (samegit patch-id). Head38078934b(was0f2f9967c). Checks not rerun here: CI on the new head.38078934b0a96a9b63d9Rebased onto mod-api
5740a5df(two new commits on041890bb: actors.pose/freeze, and #2902's pool-flag sites in the owners table): head38078934b->a96a9b63d, the same diff (git patch-id unchanged). Checks not rerun on this PC: CI on the new head.Closing in favour of #2938: one pull request into
mod-apiwith every fix a Windows test of it found, as asked. This PR's commits are there, rebased ontomod-api@5740a5dfand checked again there on Windows (in the game, confined, and every game-free check) and Linux; its description lists this one.Pull request closed