Skip to content

msvc: hash profiles passed directly to clang-cl - #2962

Open
marcpems wants to merge 2 commits into
mozilla:mainfrom
marcpems:fix/clang-cl-profile-cache
Open

marcpems wants to merge 2 commits into
mozilla:mainfrom
marcpems:fix/clang-cl-profile-cache

Conversation

@marcpems

@marcpems marcpems commented Oct 28, 2026 •

Copy link
Copy Markdown

This change addresses a gap in the handling of PGO file names for clang-cl only. Discovered with the Rust project, where changing the PGO handing did not force a cache miss.

Resolves #2964

Both the missing commands for instrumenting and using profile data have been added.
Simple test to validate flag support included.

cargo fmt -- --check - Passed
cargo clippy --locked --all-targets -- -D warnings -A unknown-lints -A clippy::type_complexity -A - Passed
cargo test --locked --lib --bins --tests  - 621 passed, 0 failed, 1 ignored

@marcpems
marcpems marked this pull request as ready for review October 28, 2026 13:03
@marcpems

Copy link
Copy Markdown
Author

@sylvestre please could you take a look?
this is related to work to re-enable Rust PGO for x64, here rust-lang/rust#164707

@codecov-commenter

codecov-commenter commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.82%. Comparing base (edeffeb) to head (319bd1a).

Files with missing lines Patch % Lines
src/compiler/msvc.rs 94.11% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2962   +/-   ##
=======================================
  Coverage   78.82%   78.82%           
=======================================
  Files          75       75           
  Lines       45394    45411   +17     
=======================================
+ Hits        35781    35796   +15     
- Misses       9613     9615    +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Marcus Perryman and others added 2 commits November 10, 2026 16:59
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sylvestre
sylvestre force-pushed the fix/clang-cl-profile-cache branch from f95a9a3 to 319bd1a Compare November 10, 2026 15:59
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.

Invoking clang-cl with pgo profile parameters omits the file content in the hash key

2 participants