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

Add LTO to the metadata filename hash. #8755

Merged
merged 1 commit into from
Oct 5, 2020
Merged

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Oct 5, 2020

There are some rare cases where different cargo commands end up building dependencies with different LTO settings. This adds the LTO value to the filename hash so that the cache does not thrash when switching between these commands.

Fixes #8669

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 5, 2020
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Oct 5, 2020

📌 Commit 6225143b2ab203ed1cf6bf443261c71a09bae84b has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 5, 2020
@bors
Copy link
Contributor

bors commented Oct 5, 2020

🔒 Merge conflict

This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again.

How do I rebase?

Assuming self is your fork and upstream is this repository, you can resolve the conflict following these steps:

  1. git checkout fingerprint-lto (switch to your branch)
  2. git fetch upstream master (retrieve the latest master)
  3. git rebase upstream/master -p (rebase on top of it)
  4. Follow the on-screen instruction to resolve conflicts (check git status if you got lost).
  5. git push self fingerprint-lto --force-with-lease (update this PR)

You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial.

Please avoid the "Resolve conflicts" button on GitHub. It uses git merge instead of git rebase which makes the PR commit history more difficult to read.

Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Cargo.lock conflict is handled during merge and rebase. This is normal, and you should still perform step 5 to update this PR.

Error message
Auto-merging tests/testsuite/lto.rs
CONFLICT (content): Merge conflict in tests/testsuite/lto.rs
Auto-merging src/cargo/core/compiler/lto.rs
Automatic merge failed; fix conflicts and then commit the result.

@bors bors added S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 5, 2020
@bors
Copy link
Contributor

bors commented Oct 5, 2020

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

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@ehuss
Copy link
Contributor Author

ehuss commented Oct 5, 2020

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Oct 5, 2020

📌 Commit a2e48fd has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. labels Oct 5, 2020
@bors
Copy link
Contributor

bors commented Oct 5, 2020

⌛ Testing commit a2e48fd with merge 9d1a486...

@bors
Copy link
Contributor

bors commented Oct 5, 2020

☀️ Test successful - checks-actions
Approved by: alexcrichton
Pushing 9d1a486 to master...

@bors bors merged commit 9d1a486 into rust-lang:master Oct 5, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 7, 2020
Update cargo

3 commits in 75615f8e69f748d7ef0df7bc0b064a9b1f5c78b2..9d1a4863abd9237dbf9d1b74c78632b6a205f6bb
2020-09-29 18:42:19 +0000 to 2020-10-05 18:29:52 +0000
- Add LTO to the metadata filename hash. (rust-lang/cargo#8755)
- Fix dylib+rlib with LTO. (rust-lang/cargo#8754)
- Homepage doc cargo metadata (rust-lang/cargo#8744)
@ehuss ehuss added this to the 1.49.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lto = true causes dependency rebuilds when alternating cargo build and cargo build --tests
4 participants