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

static libraries not reproducible on Mac, causes Rust cache misses #169

Closed
luser opened this issue Aug 3, 2017 · 2 comments
Closed

static libraries not reproducible on Mac, causes Rust cache misses #169

luser opened this issue Aug 3, 2017 · 2 comments

Comments

@luser
Copy link
Contributor

luser commented Aug 3, 2017

@metajack found this while trying to use sccache to build servo on Mac. There's a crate that uses the gcc crate in a build script to build a static library, and the crate is always a cache miss because sccache includes the hash of the static library in the cache key, but Apple's ld includes timestamps in static libraries (with no way to disable that behavior, AFAICT), so the file never hashes the same.

We discussed a few remedies, including having the gcc crate zero out the timestamps on static libraries it generates, or having sccache parse static libraries and hashing only the object files within.

@froydnj
Copy link
Contributor

froydnj commented Oct 25, 2017

rust-lang/cc-rs#225 was added to make Mac ar invocations more deterministic, but apparently that didn't address all of the issues. Modifying sccache's hashing of ar files seems like it's going to be necessary.

@metajack
Copy link
Contributor

I have a WIP patch for this: https://github.com/metajack/sccache/tree/custom-hashing

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

No branches or pull requests

4 participants