Record the compile flags a build actually used #2576
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot#2576
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The idea
A built game does not say which CPU flags produced it.
hookshot_version.txtstores the release and the builder path. The binary's version string stores the release and a hash of the sources. The build log prints a hash of the flags (object keys: … flags …) so two logs can be compared, and that hash is not the flags and is not kept in the game folder.Two builds of the same release can still differ:
host_march()choosesx86-64,x86-64-v2, orx86-64-v3, andRX_MARCHcan name something else (znver2,rocketlake). On a Steam Deck,nightlyalso adds-mtune=znver2only while that machine is doing the compile. Nothing written next tobin/hookshotrecords that choice, so a player, a bug report, and a later update cannot tell what this binary was built for.Record the flags that change the generated code, the same set
flag_text()already hashes, minus include paths. That is-march,-mtunewhen set,-ffp-contract, and any extra CPU flags passed for that build. Write them in the game folder besidehookshot_version.txt, and compile the same text into the binary the wayHOOKSHOT_VERSIONis compiled in, so the log can print it.-ffp-contract=offstays part of the recorded set, since the lifted code depends on it.Checked on v2.1.0, the newest release, and on
nightly(fce53453, 187 commits later, 11 November 2026). Neither records these flags.Anything else
RX_CPU_FLAGSdoes not exist in the repository today. An extra flag such as-mprefer-vector-width=256only survives if the person compiling exports it for that one run. DLSS is already remembered separately (the builder checkbox, and onnightlynvidia_license=1inbuilder.ini, #2485). This request is the CPU flags, not that checkbox.Thanks for the report. Reports of the same kind are collected in #2505, which lists this one with your details and links back here, so one fix closes them together. Follow #2505 for the fix and add new details there (or here). If this turns out to be separate it will be reopened.
Thanks for looking. This is a feature request, not a failed build: record the CPU flags a build used, in the game folder and in the log. #2505 is for builds that fail, run out of disk, or take too long, and its list does not mention this. Could it be reopened as separate?