I should not be necessary to distinguish between existence and
non-existence of -frandom-seed if random_seed sloppiness is requested,
so don't hash the "-frandom-seed=" part either.
Ignore `+__DATE__+`, `+__TIME__+` and `+__TIMESTAMP__+` being present in the
source code.
*random_seed*::
- By default, ccache will respect argument changes with `-frandom-seed`. This
- sloppiness will allow cache hits even if the seed value is different.
+ Ignore the `-frandom-seed` option and its arguments when computing the input
+ hash. This is useful if your build system generates different seeds between
+ builds and you are OK with reusing cached results.
--
+
See the discussion under _<<Troubleshooting>>_ for more information.
return {};
}
- // If we treat random_seed sloppily we ignore the argument when
- // hashing.
if (util::starts_with(args[i], "-frandom-seed=")
&& ctx.config.sloppiness().is_enabled(core::Sloppy::random_seed)) {
- hash.hash_delimiter("arg");
- hash.hash("-frandom-seed=");
+ LOG("Ignoring {} since random_seed sloppiness is requested", args[i]);
return {};
}
ivfsoverlay = 1U << 10,
// Allow us to include incorrect working directory in .gcno files.
gcno_cwd = 1U << 11,
- // Ignore changes in -frandom-seed
+ // Ignore -frandom-seed=*string*.
random_seed = 1U << 12,
};