CCache: Difference between revisions
imported>Pupbrained m Typo fixes |
Sloppiness |
||
Line 155: | Line 155: | ||
sudo watch ccache --dir /nix/var/cache/ccache --show-stats | sudo watch ccache --dir /nix/var/cache/ccache --show-stats | ||
</pre> | </pre> | ||
== Sloppiness == | |||
By default, <code>stdenv</code> inserts <code>-frandom-seed</code> C compiler flag with a value that changes whenever the derivation hash has changed. | |||
Consequently, this behavior completely defeats any usage of <code>ccacheWrapper</code> | |||
To counterpart this behavior, add the following line to the ccache config (typically <code>/var/cache/ccache/ccache.conf</code>): | |||
<pre> | |||
sloppiness = random_seed | |||
</pre> | |||
Be warned that this configuration option might affect reproducibility of builds, and could lead to cache poisoning. | |||
See [https://github.com/NixOS/nixpkgs/issues/109033 issue 109033] for more details. | |||
== Uncacheable == | == Uncacheable == |