-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Upgrades the coverage map to Version 4 #79365
Conversation
Changes the coverage map injected into binaries compiled with `-Zinstrument-coverage` to LLVM Coverage Mapping Format, Version 4 (from Version 3). Note, binaries compiled with this version will require LLVM tools from at least LLVM Version 11.
cc: @tmandry |
@wesleywiser - I confirmed the I also hand-checked the new coverage mapping format and LLVM IR changes on Windows and Mac. |
Do I need to implement a backward-compatible solution with LLVM 9 and 10? I'm not sure how important it is to support these older versions, or if it's feasible (or practical) to require LLVM if users want to use |
1381a85
to
5d5dc4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some style recomendations
Thanks for this PR, getting nice results with it |
I opened a topic on Zulip to discuss this. IMO I think requiring LLVM 11 to use this feature is fine but we'll see what others think. |
Thanks for catching these. |
* `rustc` should now compile under LLVM 9 or 10 * Compiler generates an error if `-Z instrument-coverage` is specified but LLVM version is less than 11 * Coverage tests that require `-Z instrument-coverage` and run codegen should be skipped if LLVM version is less than 11
@wesleywiser - FYI, I looked into adding a check in This PR attempts to resolve the CI errors. I didn't try checking the LLVM version under mir-opt. I'm not sure if the mir-opt tests skip codegen or not. If they don't it may fail again, and I'll have to deal with it. The other tests should be automatically skipped for LLVM < 11 though. |
Co-authored-by: Wesley Wiser <wwiser@gmail.com>
Here's the new error message, generated by Rust instead of LLVM...
|
Actually, not that it matters too much, but the assert output would likely be:
because the version number is 0-based. I forced the error for testing by setting the expected version to Version 5 (0-based version number 4) in the output above. |
Thanks @richkadel! @bors r+ |
⌛ Testing commit d334f58 with merge be11c42f934494147a973ae5f53a151b51ff1c75... |
💔 Test failed - checks-actions |
The angle brackets were confusing my IDE and I thought they were unnecessary. I was wrong.
@bors r+ |
📌 Commit fdbc121 has been approved by |
⌛ Testing commit fdbc121 with merge 737462e9563ba2d989b9bd1225a0103e5b9facab... |
💔 Test failed - checks-actions |
Build issue in
|
@Mark-Simulacrum - It looks like the last 3 jobs on the bors queue failed for the same reason. |
@jonas-schievink FYI, this was another one of several recently failed on powerpc. I noticed you closed the tree. Thanks. If/when resolved, I'd be thankful for a bors retry 🤞 🙂 |
@bors retry |
…as-schievink Rollup of 10 pull requests Successful merges: - rust-lang#77758 (suggest turbofish syntax for uninferred const arguments) - rust-lang#79000 (Move lev_distance to rustc_ast, make non-generic) - rust-lang#79362 (Lower patterns before using the bound variable) - rust-lang#79365 (Upgrades the coverage map to Version 4) - rust-lang#79402 (Fix typos) - rust-lang#79412 (Clean up rustdoc tests by removing unnecessary features) - rust-lang#79413 (Fix persisted doctests on Windows / when using workspaces) - rust-lang#79420 (Fixes a word typo in librustdoc) - rust-lang#79421 (Fix docs formatting for `thir::pattern::_match`) - rust-lang#79428 (Fixup compiler docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Changes the coverage map injected into binaries compiled with
-Zinstrument-coverage
to LLVM Coverage Mapping Format, Version 4 (fromVersion 3). Note, binaries compiled with this version will require LLVM
tools from at least LLVM Version 11.
r? @wesleywiser