Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply LTO config to rustdoc #135832

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Jan 21, 2025

Before, the LTO configuration from config.toml was not applied to rustdoc. This provides a small perf. and binary size win for doc builds.

Since this is configured with Cargo profiles and not rustflags, it should not break tool build cache (#131155). I tried to run x test miri, x test rustdoc and x test miri and nothing was rebuilt.

r? @onur-ozkan

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jan 21, 2025
@onur-ozkan
Copy link
Member

That's a good imrovement. You may want to add a change entry for this :)

@Kobzol
Copy link
Contributor Author

Kobzol commented Jan 21, 2025

Ok, I'll do that. Let's also double check that the perf. win applies on this PR.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 21, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 21, 2025
Apply LTO config to rustdoc

Before, the LTO configuration from `config.toml` was not applied to `rustdoc`. This provides a small perf. and binary size [win](rust-lang#112049 (comment)) for doc builds.

Since this is configured with Cargo profiles and not rustflags, it should not break tool build cache (rust-lang#131155). I tried to run `x test miri`, `x test rustdoc` and `x test miri` and nothing was rebuilt.

r? `@onur-ozkan`
@bors
Copy link
Contributor

bors commented Jan 21, 2025

⌛ Trying commit 2a25286 with merge 5f13723...

@bors
Copy link
Contributor

bors commented Jan 21, 2025

☀️ Try build successful - checks-actions
Build commit: 5f13723 (5f13723e9423dd9c2e1962e48d07a29942d2daea)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5f13723): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.6%, -0.2%] 9
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.2%] 3
All ❌✅ (primary) -0.3% [-0.6%, -0.2%] 9

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 764.328s -> 765.487s (0.15%)
Artifact size: 326.09 MiB -> 325.96 MiB (-0.04%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jan 21, 2025
Before, the LTO configuration from `config.toml` was not applied to `rustdoc`.
@Kobzol
Copy link
Contributor Author

Kobzol commented Jan 22, 2025

Updated the change tracker.

@rustbot ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants