Joel Rosdahl [Sat, 5 Nov 2022 12:03:22 +0000 (13:03 +0100)]
feat: Include I_MPI_CC/I_MPI_CXX in the input hash
The I_MPI_CC and I_MPI_CXX variables affect which underlying compiler
ICC uses. Reference:
<https://www.intel.com/content/www/us/en/develop/documentation/
mpi-developer-reference-windows/top/environment-variable-reference/
compilation-environment-variables.html>.
rblx-kbuck [Fri, 28 Oct 2022 18:41:28 +0000 (11:41 -0700)]
fix: Process the argument following a -Xarch argument (#1199)
Since there are already checks enforcing that all -Xarch arguments match
each other and -arch, we can assume that the compiler would also
interpret the following argument, so ccache should interpret it too.
Joel Rosdahl [Sat, 15 Oct 2022 18:26:18 +0000 (20:26 +0200)]
refactor: Rename ShowIncludesParser to MsvcShowIncludesOutput
I think that this is more in line with what the namespace represents. I
also renamed ShowIncludesParser::tokenize to
MsvcShowIncludesOutput::get_includes since it's not returning generic
tokens but specifically includes files.
Orgad Shaneh [Wed, 12 Oct 2022 18:49:07 +0000 (21:49 +0300)]
test: Make the integration tests work under Windows (#1133)
Adapted the integration test scripts to be able to run on Windows.
- Added the ".sh" extension to most shell scripts. It looks like Windows needs
this to run the scripts.
- Added special handling of carriage return characters.
- Tests that fail are deactivated for the moment.
- Added additional runners in different Msys2 environments.
- Disabled the remote_http tests "Basic auth required" and "Basic auth failed"
due to intermittent failures.
- Disabled PCH tests for MSYS/Clang.
Co-authored-by: R. Voggenauer <rvogg@users.noreply.github.com>
Orgad Shaneh [Wed, 5 Oct 2022 18:24:14 +0000 (21:24 +0300)]
fix: Retain line CRLF in compiler output on Windows (#1173)
When the cached data is read, the output to fd is binary
(Util::send_to_fd), so in order to maintain the original
line endings, the output must be stored as binary too.
Joel Rosdahl [Tue, 4 Oct 2022 19:31:12 +0000 (21:31 +0200)]
feat: Improve handling of -frandom-seed and description of sloppiness
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.
Joel Rosdahl [Mon, 3 Oct 2022 18:18:03 +0000 (20:18 +0200)]
feat: Improve statistics for remote hits/misses
ccache collects statistics about local and remote storage layer get/put
operations and describes them as "local/remote hits/misses" in the
output of "ccache -s". However, since "hits" and "misses" mean "result
hit/miss" in the "cacheable calls" section, it's easy to think that they
measure the same thing.
This commit improves the situation by:
- Adding new "local/remote hits/misses" counters that mean "result
hit/miss". These are shown if remote storage is used (since they
otherwise are redundant and equal to the normal "hits/misses"
counters) or if the -v/--verbose option is given.
- Presenting the previous "local/remote hits/misses" counters as
"local/remote reads". Only shown in verbose mode.
- Adding "local/remote writes" counters. Only shown in verbose mode.
Joel Rosdahl [Sun, 25 Sep 2022 18:28:40 +0000 (20:28 +0200)]
chore: Rename primary/secondary storage to local/remote storage
There is a feature request to be able not to use a local cache at all,
only a network cache. With such a feature, the names "primary storage"
and "secondary storage" make less sense since ccache would be operating
in "secondary only" mode, but then that storage would of course become
the primary (and only).
Let's rename "primary storage" to "local storage" and "secondary
storage" to "remote storage" – operating in "remote only" mode then
makes sense.
One of the original motivations to call networked storage "secondary" is
that the file storage can be used for local file systems as well, making
such storage "not quite remote", but in practice I guess the file
storage backend used primarily for network file systems.
Joel Rosdahl [Tue, 20 Sep 2022 17:05:38 +0000 (19:05 +0200)]
feat: Use subsecond timestamps for include file check
To avoid a race condition, ccache disables the direct mode if an include
file has a too new mtime or ctime. Previously this check used one second
resolution timestamps, which meant that a generated include file often
would disable direct mode hits for up to one second. Now ccache uses
timestamps with subsecond resolution (nanoseconds on Linux), so the
direct mode will in practice no longer have to be disabled for generated
include files.