]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
5 years agoREADME.md: Fix and improve links to installation instructions
Joel Rosdahl [Wed, 12 Aug 2020 18:12:12 +0000 (20:12 +0200)] 
README.md: Fix and improve links to installation instructions

Closes #633.

5 years agoAdd new absolute_paths_in_stderr (CCACHE_ABSSTDERR) feature
Joel Rosdahl [Tue, 11 Aug 2020 19:05:15 +0000 (21:05 +0200)] 
Add new absolute_paths_in_stderr (CCACHE_ABSSTDERR) feature

Motivation for the feature: When using the “Unix Makefiles” generator
with CMake, the compiler is executed in a different CWD than the “make”
command. This works well since absolute paths are passed to the
compiler. But combined with ccache’s base_dir feature the paths in
compiler error or warning messages will be incorrect since they will be
relative to the CWD of the compiler, not the CWD where the user or IDE
ran “make”. absolute_paths_in_stderr helps with this problem by
rewriting relative paths to absolute paths in the compiler’s stderr
output so that the user or IDE will see valid paths.

5 years agoUtil::send_to_stderr: Refactor to take Context parameter
Joel Rosdahl [Tue, 11 Aug 2020 18:47:48 +0000 (20:47 +0200)] 
Util::send_to_stderr: Refactor to take Context parameter

5 years agoMake testdir/failed symlink correct
Joel Rosdahl [Tue, 11 Aug 2020 18:45:53 +0000 (20:45 +0200)] 
Make testdir/failed symlink correct

Regression in d575526c91a8.

5 years agoAvoid reading outside input in expand_environment_variables
Joel Rosdahl [Sun, 9 Aug 2020 20:24:24 +0000 (22:24 +0200)] 
Avoid reading outside input in expand_environment_variables

The edge case of an input “$” without a following variable name was not
ported correctly in ab3c68b266d0d2d24c46dd1ef32e74e35ec388d6.

5 years agoUse XDG base directories by default
Joel Rosdahl [Sat, 8 Aug 2020 18:41:18 +0000 (20:41 +0200)] 
Use XDG base directories by default

ccache will now follow the XDG Base Directory Specification
(https://specifications.freedesktop.org/basedir-spec/) by default so
that:

- the cache directory is $XDG_CACHE_HOME/ccache (or $HOME/.cache/ccache
  if XDG_CACHE_HOME is not set), and
- the (primary) configuration file is
  $XDG_CONFIG_HOME/ccache/ccache.conf (or
  $HOME/.config/ccache/ccache.conf if XDG_CONFIG_HOME is not set).

On macOS, the fallback cache directory is $HOME/Library/Caches/ccache
and the fallback configuration file is
$HOME/Library/Preferences/ccache/ccache.conf. On Windows, the fallback
cache directory is %APPDATA%/ccache and the fallback configuration file
is %APPDATA%/ccache/ccache.conf.

Exceptions:

1. If CCACHE_CONFIGPATH is set, use that path for the configuration
   file.
2. If CCACHE_DIR is set (or ccache_dir in the secondary configuration),
   use that path for the cache directory and $CCACHE_DIR/ccache.conf for
   the configuration file.
3. If the legacy $HOME/.ccache directory exists, use that cache
   directory and $HOME/.ccache/ccache.conf for the configuration file.

Closes #191.

5 years agoUpgrade to fmt 7.0.3
Joel Rosdahl [Fri, 7 Aug 2020 13:54:36 +0000 (15:54 +0200)] 
Upgrade to fmt 7.0.3

5 years agoAdd -d/--directory option
Joel Rosdahl [Fri, 7 Aug 2020 12:20:02 +0000 (14:20 +0200)] 
Add -d/--directory option

The option makes subsequent command line options operate on the given
cache directory instead of the default.

5 years agoAdd --checksum-file option for debugging/evaluating checksums
Joel Rosdahl [Thu, 6 Aug 2020 19:32:34 +0000 (21:32 +0200)] 
Add --checksum-file option for debugging/evaluating checksums

5 years agoAdd and use Util::read_fd helper function
Joel Rosdahl [Thu, 6 Aug 2020 19:23:40 +0000 (21:23 +0200)] 
Add and use Util::read_fd helper function

5 years agoRemove unused typedefs
Joel Rosdahl [Thu, 6 Aug 2020 19:10:29 +0000 (21:10 +0200)] 
Remove unused typedefs

5 years agoPretty-print binary data in .ccache-input-text files
Joel Rosdahl [Thu, 6 Aug 2020 17:15:19 +0000 (19:15 +0200)] 
Pretty-print binary data in .ccache-input-text files

This happens when the i-node cache is enabled.

5 years agoUpgrade to zstd 1.4.5
Joel Rosdahl [Wed, 8 Jul 2020 13:36:37 +0000 (15:36 +0200)] 
Upgrade to zstd 1.4.5

Fixes #631.

5 years agoUse nullptr instead of NULL
Joel Rosdahl [Thu, 6 Aug 2020 14:59:57 +0000 (16:59 +0200)] 
Use nullptr instead of NULL

5 years agoRemove superfluous include of cstdint/stdint.h
Joel Rosdahl [Thu, 6 Aug 2020 14:57:01 +0000 (16:57 +0200)] 
Remove superfluous include of cstdint/stdint.h

It’s included implicitly by cinttypes.

5 years agoImprove name of add_extra_arg function
Joel Rosdahl [Thu, 6 Aug 2020 14:53:29 +0000 (16:53 +0200)] 
Improve name of add_extra_arg function

5 years agoUpgrade to BLAKE3 0.3.6
Joel Rosdahl [Thu, 6 Aug 2020 14:48:07 +0000 (16:48 +0200)] 
Upgrade to BLAKE3 0.3.6

5 years agoImprove building via Docker
Joel Rosdahl [Thu, 6 Aug 2020 14:21:52 +0000 (16:21 +0200)] 
Improve building via Docker

- Simplified names (e.g. ubuntu-14-trusty -> ubuntu-14.04,
  debian-9-stretch -> debian-9).
- Enabled debian-9 in misc/test-all-systems since it works.
- Renamed centos to centos-7.
- Added centos-8 and fedora-32.
- Updated dockerfiles/README to match reality after the conversion to
  CMake.
- Cleaned up Dockerfiles.
- Improved misc/test-all-systems.
- Removed unsupported Clang build for alpine-3.4, centos-7 and
  ubuntu-14.04.

5 years agoUpgrade to fmt 7.0.2
Joel Rosdahl [Thu, 6 Aug 2020 13:17:12 +0000 (15:17 +0200)] 
Upgrade to fmt 7.0.2

5 years agocolor_diagnostics test: Fix race conditions on some platforms
Joel Rosdahl [Thu, 6 Aug 2020 08:42:48 +0000 (10:42 +0200)] 
color_diagnostics test: Fix race conditions on some platforms

script(1) returns early on some platforms (leaving a child process
living for a short while) and the output may therefore still be pending.
Work around this by sleeping until the output file has content.

5 years agoCCACHE_PREFIX test: Fix failure for GCC <4.9
Joel Rosdahl [Thu, 6 Aug 2020 07:41:55 +0000 (09:41 +0200)] 
CCACHE_PREFIX test: Fix failure for GCC <4.9

The CCACHE_PREFIX test logs execution of prefixes. After
1c6ccf18c2e04459b1ac76ede4580b3ddcd27bbe (#596) the compiler and
prefixes can be run twice if GCC doesn’t support -fdiagnostics-color and
the test case is not prepared for that. Fix this by letting prefix-a
truncate the log file.

5 years agoci/build: Make it possible to specify CC for tests
Joel Rosdahl [Thu, 6 Aug 2020 07:02:50 +0000 (09:02 +0200)] 
ci/build: Make it possible to specify CC for tests

5 years agoDon’t look up or store tmp stderr files in i-node cache
Joel Rosdahl [Wed, 5 Aug 2020 18:52:25 +0000 (20:52 +0200)] 
Don’t look up or store tmp stderr files in i-node cache

The tmp.cpp_stderr file produced by the preprocessor is looked up and
stored in the i-node cache, which is wasted effort since it’s a
temporary file.

5 years agoDon’t depend on which(1) to detect commands
Joel Rosdahl [Wed, 5 Aug 2020 18:26:53 +0000 (20:26 +0200)] 
Don’t depend on which(1) to detect commands

5 years agoOnly define clone_file when it’s supported
Joel Rosdahl [Wed, 5 Aug 2020 14:00:04 +0000 (16:00 +0200)] 
Only define clone_file when it’s supported

This avoids warnings that the function can be marked [[noreturn]] in the
!FILE_CLONING_SUPPORTED case.

5 years agoImprove Clang modules test suite
Joel Rosdahl [Tue, 4 Aug 2020 19:09:59 +0000 (21:09 +0200)] 
Improve Clang modules test suite

- Backdate modified header so that the test actually tests content and
  not bails out early due to too new header timestamp.
- Verify that modifications to module.modulemap are detected, which is
  key to how the modules support works.

5 years agoRemove unnecessary compiler behavior test in modules test suite
Joel Rosdahl [Tue, 4 Aug 2020 19:07:09 +0000 (21:07 +0200)] 
Remove unnecessary compiler behavior test in modules test suite

The “preprocessor output” test in the modules test suite only tests
compiler behavior, and the string it looks for in the preprocessed
output is different for older and newer Clang versions. It seems like a
kind of a probing call, but I don’t see why we would want to probe the
compiler behavior in this case so I’ll just remove it.

Fixes #601.

5 years agoWork around missing std::is_trivially_copyable in GCC < 5
Joel Rosdahl [Tue, 4 Aug 2020 14:51:25 +0000 (16:51 +0200)] 
Work around missing std::is_trivially_copyable in GCC < 5

5 years agoRetrieve non-const pointer to std::string data without casting
Joel Rosdahl [Tue, 4 Aug 2020 14:32:14 +0000 (16:32 +0200)] 
Retrieve non-const pointer to std::string data without casting

5 years agoReplace failed function with throwing Failure exception explicitly
Joel Rosdahl [Tue, 4 Aug 2020 09:49:24 +0000 (11:49 +0200)] 
Replace failed function with throwing Failure exception explicitly

I think that this improves code readability since it’s more clear what
the code flow is.

5 years agoClean up system.hpp
Joel Rosdahl [Tue, 4 Aug 2020 09:43:55 +0000 (11:43 +0200)] 
Clean up system.hpp

5 years agoClean up ccache.hpp
Joel Rosdahl [Tue, 4 Aug 2020 09:38:21 +0000 (11:38 +0200)] 
Clean up ccache.hpp

5 years agoFix comment to match reality regarding process_preprocessed_file
Joel Rosdahl [Tue, 4 Aug 2020 09:37:46 +0000 (11:37 +0200)] 
Fix comment to match reality regarding process_preprocessed_file

5 years agoLet Error constructor forward arguments to fmt::format
Joel Rosdahl [Mon, 3 Aug 2020 19:07:32 +0000 (21:07 +0200)] 
Let Error constructor forward arguments to fmt::format

5 years agoReplace fatal function with throwing FatalError exception explicitly
Joel Rosdahl [Mon, 3 Aug 2020 18:03:13 +0000 (20:03 +0200)] 
Replace fatal function with throwing FatalError exception explicitly

I think that this improves code readability since it’s more clear what
the code flow is.

5 years agoUse fmt::print instead of (f)printf
Joel Rosdahl [Mon, 3 Aug 2020 14:58:47 +0000 (16:58 +0200)] 
Use fmt::print instead of (f)printf

5 years agoRemove superfluous .c_str() calls
Joel Rosdahl [Mon, 3 Aug 2020 15:00:42 +0000 (17:00 +0200)] 
Remove superfluous .c_str() calls

5 years agoC++-ify path_max
Joel Rosdahl [Mon, 3 Aug 2020 14:58:20 +0000 (16:58 +0200)] 
C++-ify path_max

5 years agoConvert cc_log calls to Logging::log
Joel Rosdahl [Mon, 3 Aug 2020 05:18:19 +0000 (07:18 +0200)] 
Convert cc_log calls to Logging::log

5 years agoC++-ify logging routines
Joel Rosdahl [Mon, 3 Aug 2020 05:04:31 +0000 (07:04 +0200)] 
C++-ify logging routines

- Simplified and C++-ified logging code.
- Added Logging::log and Logging::bulk_log functions corresponding to
  the old cc_log and cc_bulklog functions. The new functions pass their
  arguments to fmt::format.
- Replacements:
  * init_log → Logging::init
  * cc_log → Logging::log
  * cc_bulklog → Logging::bulk_log
  * cc_log_argv → Logging::log plus Util::format_argv_for_logging
  * cc_dump_debug_log_buffer -> Logging::dump_log
- A legacy cc_log implementation is still available so that logging can
  be converted gradually to the new functionality.

5 years agoAdd missing “Util::” test case prefix
Joel Rosdahl [Sat, 1 Aug 2020 07:34:10 +0000 (09:34 +0200)] 
Add missing “Util::” test case prefix

5 years agoMove logging.cpp’s print_command to Util
Joel Rosdahl [Sat, 1 Aug 2020 07:33:45 +0000 (09:33 +0200)] 
Move logging.cpp’s print_command to Util

5 years agoLet CCACHE_UMASK apply only to files/directories in the cache directory
Joel Rosdahl [Sat, 1 Aug 2020 14:39:11 +0000 (16:39 +0200)] 
Let CCACHE_UMASK apply only to files/directories in the cache directory

Ever since the CCACHE_UMASK setting was added in
75dd382407a36b3ebab36bb1027eb43a07498bec it has applied to all files
created by ccache, including files such as the object files and
executables created when ccache is called for linking. This was
presumably the easy thing to do, but it affects the observable output
from the compiler. There are also two related bugs:

1. CCACHE_UMASK is not used when creating the initial configuration file.
2. CCACHE_UMASK is used when creating the log file.

Fix this by:

- saving the original umask in Context,
- introducing a UmaskScope class,
- using UmaskScope objects to set the original umask when calling the
  compiler and when copying result files from the cache, and
- setting the umask after creating the log file but before creating the
  initial configuration file.

Closes #628.

5 years agoResultRetriever: Clear m_dest_data between entries
Joel Rosdahl [Sat, 1 Aug 2020 07:49:45 +0000 (09:49 +0200)] 
ResultRetriever: Clear m_dest_data between entries

m_dest_data accidentally keeps its data between result entries so if an
entry has both stderr and dependency file data the stderr data will end
up in the dependency file as well. Fix this by clearing m_dest_data
properly.

Regression in 1cbaa89d1175c906bea48e40eb8f5e8c56b5afe4.

Fixes #629.

5 years agoRemove now empty legacy_util.[hc]pp files
Joel Rosdahl [Fri, 31 Jul 2020 18:10:13 +0000 (20:10 +0200)] 
Remove now empty legacy_util.[hc]pp files

5 years agoMove time_seconds function to MiniTrace.cpp where it’s used
Joel Rosdahl [Fri, 31 Jul 2020 18:09:29 +0000 (20:09 +0200)] 
Move time_seconds function to MiniTrace.cpp where it’s used

5 years agoMove set_cloexec_flag to Util
Joel Rosdahl [Fri, 31 Jul 2020 18:07:06 +0000 (20:07 +0200)] 
Move set_cloexec_flag to Util

5 years agoC++-ify x_rename
Joel Rosdahl [Fri, 31 Jul 2020 17:59:49 +0000 (19:59 +0200)] 
C++-ify x_rename

5 years agoRemove unnecessary x_exit function
Joel Rosdahl [Fri, 31 Jul 2020 17:35:53 +0000 (19:35 +0200)] 
Remove unnecessary x_exit function

It’s no longer necessary to use it after
91aa70754c3816537b080fef1c6630313b400721.

5 years agoC++-ify update_mtime
Joel Rosdahl [Fri, 31 Jul 2020 17:33:23 +0000 (19:33 +0200)] 
C++-ify update_mtime

5 years agoC++-ify is_full_path
Joel Rosdahl [Fri, 31 Jul 2020 17:28:48 +0000 (19:28 +0200)] 
C++-ify is_full_path

5 years agoConvert FATAL macro to a function
Joel Rosdahl [Fri, 31 Jul 2020 17:25:07 +0000 (19:25 +0200)] 
Convert FATAL macro to a function

5 years agoC++-ify get_home_directory
Joel Rosdahl [Fri, 31 Jul 2020 17:12:14 +0000 (19:12 +0200)] 
C++-ify get_home_directory

5 years agoInline Util::{starts,ends}_with
Joel Rosdahl [Fri, 31 Jul 2020 07:43:53 +0000 (09:43 +0200)] 
Inline Util::{starts,ends}_with

5 years agoRemove now unused str_eq, str_startswith and str_endswith macros
Joel Rosdahl [Thu, 30 Jul 2020 18:57:35 +0000 (20:57 +0200)] 
Remove now unused str_eq, str_startswith and str_endswith macros

5 years agoRemove last usage of legacy str_startswith macro
Joel Rosdahl [Thu, 30 Jul 2020 18:57:21 +0000 (20:57 +0200)] 
Remove last usage of legacy str_startswith macro

5 years agoRemove superfluous includes of ccache.hpp
Joel Rosdahl [Thu, 30 Jul 2020 18:07:41 +0000 (20:07 +0200)] 
Remove superfluous includes of ccache.hpp

5 years agoFix fmt::format error
Joel Rosdahl [Thu, 30 Jul 2020 18:03:41 +0000 (20:03 +0200)] 
Fix fmt::format error

Introduced in ed21c1feb83f62b9a2d04e959e9a3abd4eac2879.

5 years agoAdd Util::localtime, abstracting localtime_r
Joel Rosdahl [Thu, 30 Jul 2020 11:03:24 +0000 (13:03 +0200)] 
Add Util::localtime, abstracting localtime_r

5 years agoFix cherry-pick mistake in 71edf04aa2c7
Joel Rosdahl [Thu, 30 Jul 2020 06:43:05 +0000 (08:43 +0200)] 
Fix cherry-pick mistake in 71edf04aa2c7

5 years agoRemove redundant check in parse_duration after f93c55832ee3
Joel Rosdahl [Thu, 30 Jul 2020 06:25:29 +0000 (08:25 +0200)] 
Remove redundant check in parse_duration after f93c55832ee3

5 years agoC++-ify x_unsetenv
Joel Rosdahl [Thu, 30 Jul 2020 05:24:28 +0000 (07:24 +0200)] 
C++-ify x_unsetenv

5 years agoC++-ify x_setenv
Joel Rosdahl [Thu, 30 Jul 2020 05:21:45 +0000 (07:21 +0200)] 
C++-ify x_setenv

5 years agoMove get_hostname to Util
Joel Rosdahl [Thu, 30 Jul 2020 05:16:00 +0000 (07:16 +0200)] 
Move get_hostname to Util

5 years agoC++-ify parts of ccache.cpp
Joel Rosdahl [Wed, 29 Jul 2020 19:34:32 +0000 (21:34 +0200)] 
C++-ify parts of ccache.cpp

5 years agoC++-ify hashutil functions
Joel Rosdahl [Wed, 29 Jul 2020 18:31:53 +0000 (20:31 +0200)] 
C++-ify hashutil functions

5 years agoUse std::string in InodeCache APIs
Joel Rosdahl [Wed, 29 Jul 2020 17:15:58 +0000 (19:15 +0200)] 
Use std::string in InodeCache APIs

5 years agoC++-ify is_precompiled_header and move to Util
Joel Rosdahl [Wed, 29 Jul 2020 17:10:23 +0000 (19:10 +0200)] 
C++-ify is_precompiled_header and move to Util

5 years agoRemove superfluous hash_from_int function
Joel Rosdahl [Wed, 29 Jul 2020 16:51:59 +0000 (18:51 +0200)] 
Remove superfluous hash_from_int function

5 years agoC++-ify, and clean up usage of, add_exe_ext_if_no_to_fullpath
Joel Rosdahl [Wed, 29 Jul 2020 14:39:42 +0000 (16:39 +0200)] 
C++-ify, and clean up usage of, add_exe_ext_if_no_to_fullpath

5 years agoC++-ify win32argvtos
Joel Rosdahl [Wed, 29 Jul 2020 12:29:14 +0000 (14:29 +0200)] 
C++-ify win32argvtos

5 years agoRename win32compat to Win32Util
Joel Rosdahl [Wed, 29 Jul 2020 06:43:21 +0000 (08:43 +0200)] 
Rename win32compat to Win32Util

5 years agoC++-ify execute functions
Joel Rosdahl [Tue, 28 Jul 2020 18:06:36 +0000 (20:06 +0200)] 
C++-ify execute functions

5 years agoTweak function comment
Joel Rosdahl [Tue, 28 Jul 2020 18:06:26 +0000 (20:06 +0200)] 
Tweak function comment

5 years agoRemove obsolete struct pending_tmp_file declaration
Joel Rosdahl [Tue, 28 Jul 2020 18:05:29 +0000 (20:05 +0200)] 
Remove obsolete struct pending_tmp_file declaration

5 years agoConvert fatal() function to macro that forwards to fmt::format
Joel Rosdahl [Tue, 28 Jul 2020 17:53:13 +0000 (19:53 +0200)] 
Convert fatal() function to macro that forwards to fmt::format

5 years agoC++-ify {copy,write}_fd
Joel Rosdahl [Tue, 28 Jul 2020 14:46:26 +0000 (16:46 +0200)] 
C++-ify {copy,write}_fd

5 years agoAdd .mailmap entry for Arne Hasselbring
Joel Rosdahl [Tue, 28 Jul 2020 14:28:20 +0000 (16:28 +0200)] 
Add .mailmap entry for Arne Hasselbring

5 years agoFix comments to match reality
Joel Rosdahl [Tue, 28 Jul 2020 12:01:53 +0000 (14:01 +0200)] 
Fix comments to match reality

5 years agoRemove now unused legacy format function
Joel Rosdahl [Tue, 28 Jul 2020 12:00:03 +0000 (14:00 +0200)] 
Remove now unused legacy format function

5 years agoRemove last usages of the legacy format function
Joel Rosdahl [Tue, 28 Jul 2020 11:58:31 +0000 (13:58 +0200)] 
Remove last usages of the legacy format function

5 years agoC++-ify same_executable_name
Joel Rosdahl [Tue, 28 Jul 2020 11:56:30 +0000 (13:56 +0200)] 
C++-ify same_executable_name

5 years agoUse more natural order of ColorDiagnostics enum values
Joel Rosdahl [Tue, 28 Jul 2020 07:33:16 +0000 (09:33 +0200)] 
Use more natural order of ColorDiagnostics enum values

5 years agoRemove now unused legacy x_strdup function
Joel Rosdahl [Tue, 28 Jul 2020 07:04:50 +0000 (09:04 +0200)] 
Remove now unused legacy x_strdup function

5 years agoC++-ify {clone,copy,move}_file
Joel Rosdahl [Tue, 28 Jul 2020 07:03:05 +0000 (09:03 +0200)] 
C++-ify {clone,copy,move}_file

5 years agoFix build with Clang 10
Joel Rosdahl [Mon, 27 Jul 2020 18:56:45 +0000 (20:56 +0200)] 
Fix build with Clang 10

Clang 10 says “error: explicitly defaulted move constructor is
implicitly deleted [...] note: move constructor of 'TemporaryFile' is
implicitly deleted because base class 'NonCopyable' has a deleted move
constructor”, so we’ll just have to do without NonCopyable. The effect
will be the same in pracice due to the “Fd fd” member not being
copyable.

5 years agoRemove now unused legacy x_strndup function
Joel Rosdahl [Mon, 27 Jul 2020 18:26:42 +0000 (20:26 +0200)] 
Remove now unused legacy x_strndup function

5 years agoC++-ify parsing of ccache options
Joel Rosdahl [Mon, 27 Jul 2020 18:26:07 +0000 (20:26 +0200)] 
C++-ify parsing of ccache options

5 years agoRemove now unused legacy reformat function
Joel Rosdahl [Mon, 27 Jul 2020 18:04:43 +0000 (20:04 +0200)] 
Remove now unused legacy reformat function

5 years agoC++-ify parse_size_with_suffix
Joel Rosdahl [Mon, 27 Jul 2020 18:03:06 +0000 (20:03 +0200)] 
C++-ify parse_size_with_suffix

5 years agoC++-ify subst_env_in_string
Joel Rosdahl [Mon, 27 Jul 2020 13:25:04 +0000 (15:25 +0200)] 
C++-ify subst_env_in_string

5 years agoAdd missing curly braces
Joel Rosdahl [Mon, 27 Jul 2020 07:40:05 +0000 (09:40 +0200)] 
Add missing curly braces

5 years agoSimplify and clean up parse_duration_with_suffix_to_seconds
Joel Rosdahl [Sun, 26 Jul 2020 19:07:09 +0000 (21:07 +0200)] 
Simplify and clean up parse_duration_with_suffix_to_seconds

5 years agoMove and convert parse_unsigned to Util::parse_uint32
Joel Rosdahl [Sun, 26 Jul 2020 19:05:30 +0000 (21:05 +0200)] 
Move and convert parse_unsigned to Util::parse_uint32

5 years agoKeep argument lists and function implementations sorted
Joel Rosdahl [Sun, 26 Jul 2020 18:20:37 +0000 (20:20 +0200)] 
Keep argument lists and function implementations sorted

5 years agoImprove documentation of --evict-older-than
Joel Rosdahl [Sun, 26 Jul 2020 18:19:45 +0000 (20:19 +0200)] 
Improve documentation of --evict-older-than

5 years agoC++-ify stats functions
Joel Rosdahl [Sun, 26 Jul 2020 14:38:57 +0000 (16:38 +0200)] 
C++-ify stats functions

5 years agoC++-ify format_{human_readable_size,parsable_size_with_suffix}
Joel Rosdahl [Sun, 26 Jul 2020 14:27:53 +0000 (16:27 +0200)] 
C++-ify format_{human_readable_size,parsable_size_with_suffix}

5 years agoAdd --evict-older-than (#605)
Sumit Jamgade [Sun, 26 Jul 2020 18:14:19 +0000 (20:14 +0200)] 
Add --evict-older-than (#605)

The argument adds another mechanism to control contents of cache directory. And
is based on the LRU tracking behaviour.

As of now there is no way for ccache to eliminate files which were
are no longer needed. As a result these files stay and are kept around until
either max_files/max_size is reached.

If a particular project is being built regularly but for some reason is allowed
to grow in size, then under such circumstances using the LRU mechanism to control
cache size, lends as perfect solution.

The argument takes a parameter N and performs a cleanup.
While performing cleanup the oldest file in ccache can
only be N seconds old. However this cleanup will not take max_files and
max_old into consideration

5 years agoLet ResultRetriever collect and operate on the full dependency data
Joel Rosdahl [Sat, 25 Jul 2020 18:29:44 +0000 (20:29 +0200)] 
Let ResultRetriever collect and operate on the full dependency data

When rewriting the dependency target (#592) the target can in theory
span chunk boundaries, so let ResultRetriever collect and operate on the
full data, just like the stderr output.