Build: thin LTO for release and diag builds #677

Open
github-bot wants to merge 1 commit from github-bot/gh-677 into main AGit
Owner

@⁠wbkepler on GitHub · 2026-11-24 06:41 UTC · original
wbkepler:build/release-tuning-and-config → main · +4 −0 · 1 files · 1 commits · open

Summary

Enables lto = "thin" in root Cargo.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 — passed
  • cargo clippy --workspace --all-targets — passed
  • cargo clippy -p victory --features diagnostics --all-targets — passed
  • cargo test --workspace — passed
  • cargo xtask policy — passed (151 files ok)
**@⁠wbkepler** on GitHub · 2026-11-24 06:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/677) `wbkepler:build/release-tuning-and-config` → `main` · +4 −0 · 1 files · 1 commits · open ## Summary Enables `lto = "thin"` in root `Cargo.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` — passed - `cargo clippy --workspace --all-targets` — passed - `cargo clippy -p victory --features diagnostics --all-targets` — passed - `cargo test --workspace` — passed - `cargo xtask policy` — passed (151 files ok)
Enable `lto = "thin"` in `[profile.release]` (the `diag` profile inherits it)
so calls across the workspace crates (shader translation, host GPU layer,
runtime) can inline in release builds, without the build time of fat LTO.

No behavior change; verified with a release build of the `victory` binary.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:12:40 +00:00
Author
Owner

@⁠ErRusso on GitHub · 2026-11-24 11:19 UTC · original

Audit: ✅ Looks good

Reviewed this PR as part of an audit of mergeable PRs.

  • Scope: Cargo.toml [profile.release] (+4/-0). Adds lto = "thin" with a clear comment about cross-crate inlining (translator, host GPU layer, runtime) at far less build time than fat LTO. The diag profile inherits it via inherits = "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.

**@⁠ErRusso** on GitHub · 2026-11-24 11:19 UTC · [original](https://github.com/Marvisak/VIctory/pull/677#issuecomment-7129946084) ## Audit: ✅ Looks good Reviewed this PR as part of an audit of mergeable PRs. - **Scope:** `Cargo.toml` `[profile.release]` (+4/-0). Adds `lto = "thin"` with a clear comment about cross-crate inlining (translator, host GPU layer, runtime) at far less build time than fat LTO. The `diag` profile inherits it via `inherits = "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.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:24 UTC · original

Automated triage for the maintainers.

Needs work: needs the maintainer's decision. The change adds lto = "thin" to [profile.release] in the root Cargo.toml, and [profile.diag] inherits it. Triage does not pass build-configuration changes in Cargo.toml (anything beyond feature flags) on its own, so this one waits for the maintainer.

To support it, please add numbers to the PR:

  • release build time (clean and incremental) before and after, on the same machine;
  • a measured runtime effect, e.g. victory translate wall 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 diag build) has no shown benefit to weigh against.

CI: not run on this head.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/677#issuecomment-7149520231) <!-- victory-triage v1 head=0284037e045c50e457f3885427c7ca72a232ffe9 verdict=needs-work at=2026-11-25T01:24:50Z --> Automated triage for the maintainers. **Needs work: needs the maintainer's decision.** The change adds `lto = "thin"` to `[profile.release]` in the root `Cargo.toml`, and `[profile.diag]` inherits it. Triage does not pass build-configuration changes in `Cargo.toml` (anything beyond feature flags) on its own, so this one waits for the maintainer. To support it, please add numbers to the PR: - release build time (clean and incremental) before and after, on the same machine; - a measured runtime effect, e.g. `victory translate` wall 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 `diag` build) has no shown benefit to weigh against. CI: not run on this head. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/677/head:github-bot/gh-677'
git switch 'github-bot/gh-677'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-677'
git switch 'github-bot/gh-677'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-677'
git switch 'github-bot/gh-677'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-677'
git switch 'main'
git merge --squash 'github-bot/gh-677'
git switch 'main'
git merge --ff-only 'github-bot/gh-677'
git switch 'main'
git merge 'github-bot/gh-677'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!677
No description provided.