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

Omit some arguments with paths from Rust hash calculation. Fixes #207, #196 #345

Merged
merged 1 commit into from
Dec 17, 2018

Conversation

luser
Copy link
Contributor

@luser luser commented Dec 17, 2018

Some rustc arguments like --out-dir, -L, and --extern contain absolute paths
which make building the same crate (from crates.io) in different projects
unable to get cache hits despite being otherwise the same. This patch omits
those arguments from the hash calculation which makes sccache much more useful
for local development.

For additional safety we add the cwd to the hash key, since that winds up in
the rlib and otherwise this patch could result in some compiles returning invalid results from cache.

…lla#207

Some rustc arguments like --out-dir, -L, and --extern contain absolute paths
which make building the same crate (from crates.io) in different projects
unable to get cache hits despite being otherwise the same. This patch omits
those arguments from the hash calculation which makes sccache much more useful
for local development.

For additional safety we add the cwd to the hash key, since that winds up in
the rlib and otherwise this patch could result in some compiles returning invalid results from cache.
@luser luser changed the title Omit some arguments with paths from Rust hash calculation. Fixes #207 Omit some arguments with paths from Rust hash calculation. Fixes #207, #196 Dec 17, 2018
@luser luser merged commit 1087c20 into mozilla:master Dec 17, 2018
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.

1 participant