Skip to content

Adjust LTO settings - #5408

Open
graydon wants to merge 1 commit into
stellar:masterfrom
graydon:lto-tweaks
Open

Adjust LTO settings#5408
graydon wants to merge 1 commit into
stellar:masterfrom
graydon:lto-tweaks

Conversation

@graydon

@graydon graydon commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

This cuts build times about in half for standard / release / non-fastdev builds. Depending on the machine, it gives up either no measurable runtime perf (on a fast macbook pro) or about 10% of soroswap benchmark median exec time (on a slower older xeon).

Consequently: I'm not certain this is a good idea yet. I think we should do more testing. But I wanted to open a PR to have something to build images off and test on other machines and workloads.

Copilot AI balanced review requested due to automatic review settings August 8, 2026 07:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reduces release build times by relaxing Rust LTO and code-generation settings.

Changes:

  • Switches release builds from fat to thin LTO.
  • Increases release codegen units to 16.
  • Applies profile overrides to unified and non-unified builds.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Cargo.toml Updates workspace release optimization settings.
src/Makefile.am Applies matching Cargo settings across build paths.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Cargo.toml
codegen-units = 1
lto = true
codegen-units = 16
lto="thin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants