Skip to content

Add profdata to the sccache hash checks to workaround fprofile-use flag miss-handling in sccache for msvc targets - #165138

Open
marcpems wants to merge 1 commit into
rust-lang:mainfrom
marcpems:fix/windows-llvm-profile-cache
Open

marcpems wants to merge 1 commit into
rust-lang:mainfrom
marcpems:fix/windows-llvm-profile-cache

Conversation

@marcpems

@marcpems marcpems commented Oct 29, 2026 •

Copy link
Copy Markdown

View all comments

This change works around an issue in sccache when handling PGO file names for msvc parameters when calling clang-cl.
The original issue is that any changes to the PGO profile data files will not cause a sccache miss for the relevant binaries when rebuilding for optimization, and instead will pull the cached obj files, skipping any prof data changes.

This works by adding the profdata file contents directly to the hash for relevant targets using a SCCACHE_EXTRAFILES additional setting.

When the sccache issue is resolved and in use with Rust, this change can be safely reverted.
mozilla/sccache#2962

LLM disclosure:
Astra LLM was used in diagnosing the issue, running validation passes and correctness tests.

r? kobzol

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Oct 29, 2026
@marcpems marcpems changed the title TODO Add profdata to the sccache hash checks to workaround fprofile-use flag miss-handling in sccache for msvc targets Oct 29, 2026
@rustbot

rustbot commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

kobzol is not on the review rotation at the moment.
They may take a while to respond.

@marcpems
marcpems marked this pull request as ready for review October 29, 2026 16:28
@rustbot

rustbot commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in src/tools/opt-dist

cc @Kobzol

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 29, 2026
@rust-bors

rust-bors Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #165582) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuite Area: The testsuite used to check the correctness of rustc 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.

3 participants