Build: thin LTO for release and diag builds #677
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/677"
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?
Imported from Marvisak/VIctory. Originally posted by wbkepler on 2026-11-24T06:41:28Z.
Summary
Enables
lto = "thin"in rootCargo.toml[profile.release](inherited by[profile.diag]) so hot cross-crate calls between the shader translator, host GPU layer, and runtime can inline without the link-time cost of fat LTO.Verification
cargo build --release -p victory— passedcargo clippy --workspace --all-targets— passedcargo clippy -p victory --features diagnostics --all-targets— passedcargo test --workspace— passedcargo xtask policy— passed (151 files ok)Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T06:47:20Z.
Review: APPROVED
Verified locally on macOS 26 arm64, rustc 1.98.1 (aarch64-apple-darwin) at head
0284037:cargo checkon all macOS-buildable crates: clean.lto = "thin"in[profile.release];[profile.diag]hasinherits = "release", so the comment's claim that diag inherits it is accurate.Thin LTO is a reasonable tradeoff here (cross-crate inlining for the translator/hot paths without fat-LTO build times). Approving.
Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T06:47:50Z.
Review: APPROVED
LGTM! Tested on Windows 11 with MSVC Rust 1.98.1. cargo check --release -p victory and workspace policies pass cleanly. Thin LTO provides critical cross-crate inlining between ictory-shader, ictory-gpu, and runtime without the massive build time penalty of full LTO.
Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T10:39:02Z.
Review: APPROVED
Tested
0284037on Windows 11, RTX 5070, MSVC:cargo build --release -p victorybuilds withlto = "thin". On the release binary,victory translate --validate --pipelineson the local title executable still reports 12 of 12 programs emitted, 12 validated and 12 pipelines.Cargo.toml. No dependencies or build scripts change.[profile.diag]inherits from release, so diagnostics builds pay the link-time cost too. That's the intended trade-off, and the comment says so.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by ErRusso on 2026-11-24T11:19:18Z.
Audit: ✅ Looks good
Reviewed this PR as part of an audit of mergeable PRs.
Cargo.toml[profile.release](+4/-0). Addslto = "thin"with a clear comment about cross-crate inlining (translator, host GPU layer, runtime) at far less build time than fat LTO. Thediagprofile inherits it viainherits = "release".Correct and low-risk. The profile directive is inert on platforms/compilers that don't support it (falls back gracefully), and the CI already uses
--locked.No issues found.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:24:52Z.
Automated triage for the maintainers.
Needs work: needs the maintainer's decision. The change adds
lto = "thin"to[profile.release]in the rootCargo.toml, and[profile.diag]inherits it. Triage does not pass build-configuration changes inCargo.toml(anything beyond feature flags) on its own, so this one waits for the maintainer.To support it, please add numbers to the PR:
victory translatewall time on a fixed set of containers, or frame times in-game.The comment says the crates "call each other in hot paths", but the PR shows no measurement. Without one, the cost (longer link times for every release and
diagbuild) has no shown benefit to weigh against.CI: not run on this head.
Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.