]>
git.ipfire.org Git - thirdparty/ccache.git/log
Joel Rosdahl [Fri, 31 Jul 2020 17:25:07 +0000 (19:25 +0200)]
Convert FATAL macro to a function
Joel Rosdahl [Fri, 31 Jul 2020 17:12:14 +0000 (19:12 +0200)]
C++-ify get_home_directory
Joel Rosdahl [Fri, 31 Jul 2020 07:43:53 +0000 (09:43 +0200)]
Inline Util::{starts,ends}_with
Joel Rosdahl [Thu, 30 Jul 2020 18:57:35 +0000 (20:57 +0200)]
Remove now unused str_eq, str_startswith and str_endswith macros
Joel Rosdahl [Thu, 30 Jul 2020 18:57:21 +0000 (20:57 +0200)]
Remove last usage of legacy str_startswith macro
Joel Rosdahl [Thu, 30 Jul 2020 18:07:41 +0000 (20:07 +0200)]
Remove superfluous includes of ccache.hpp
Joel Rosdahl [Thu, 30 Jul 2020 18:03:41 +0000 (20:03 +0200)]
Joel Rosdahl [Thu, 30 Jul 2020 11:03:24 +0000 (13:03 +0200)]
Add Util::localtime, abstracting localtime_r
Joel Rosdahl [Thu, 30 Jul 2020 06:43:05 +0000 (08:43 +0200)]
Fix cherry-pick mistake in
71edf04aa2c7
Joel Rosdahl [Thu, 30 Jul 2020 06:25:29 +0000 (08:25 +0200)]
Remove redundant check in parse_duration after
f93c55832ee3
Joel Rosdahl [Thu, 30 Jul 2020 05:24:28 +0000 (07:24 +0200)]
C++-ify x_unsetenv
Joel Rosdahl [Thu, 30 Jul 2020 05:21:45 +0000 (07:21 +0200)]
C++-ify x_setenv
Joel Rosdahl [Thu, 30 Jul 2020 05:16:00 +0000 (07:16 +0200)]
Move get_hostname to Util
Joel Rosdahl [Wed, 29 Jul 2020 19:34:32 +0000 (21:34 +0200)]
C++-ify parts of ccache.cpp
Joel Rosdahl [Wed, 29 Jul 2020 18:31:53 +0000 (20:31 +0200)]
C++-ify hashutil functions
Joel Rosdahl [Wed, 29 Jul 2020 17:15:58 +0000 (19:15 +0200)]
Use std::string in InodeCache APIs
Joel Rosdahl [Wed, 29 Jul 2020 17:10:23 +0000 (19:10 +0200)]
C++-ify is_precompiled_header and move to Util
Joel Rosdahl [Wed, 29 Jul 2020 16:51:59 +0000 (18:51 +0200)]
Remove superfluous hash_from_int function
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
Joel Rosdahl [Wed, 29 Jul 2020 12:29:14 +0000 (14:29 +0200)]
C++-ify win32argvtos
Joel Rosdahl [Wed, 29 Jul 2020 06:43:21 +0000 (08:43 +0200)]
Rename win32compat to Win32Util
Joel Rosdahl [Tue, 28 Jul 2020 18:06:36 +0000 (20:06 +0200)]
C++-ify execute functions
Joel Rosdahl [Tue, 28 Jul 2020 18:06:26 +0000 (20:06 +0200)]
Tweak function comment
Joel Rosdahl [Tue, 28 Jul 2020 18:05:29 +0000 (20:05 +0200)]
Remove obsolete struct pending_tmp_file declaration
Joel Rosdahl [Tue, 28 Jul 2020 17:53:13 +0000 (19:53 +0200)]
Convert fatal() function to macro that forwards to fmt::format
Joel Rosdahl [Tue, 28 Jul 2020 14:46:26 +0000 (16:46 +0200)]
C++-ify {copy,write}_fd
Joel Rosdahl [Tue, 28 Jul 2020 14:28:20 +0000 (16:28 +0200)]
Add .mailmap entry for Arne Hasselbring
Joel Rosdahl [Tue, 28 Jul 2020 12:01:53 +0000 (14:01 +0200)]
Fix comments to match reality
Joel Rosdahl [Tue, 28 Jul 2020 12:00:03 +0000 (14:00 +0200)]
Remove now unused legacy format function
Joel Rosdahl [Tue, 28 Jul 2020 11:58:31 +0000 (13:58 +0200)]
Remove last usages of the legacy format function
Joel Rosdahl [Tue, 28 Jul 2020 11:56:30 +0000 (13:56 +0200)]
C++-ify same_executable_name
Joel Rosdahl [Tue, 28 Jul 2020 07:33:16 +0000 (09:33 +0200)]
Use more natural order of ColorDiagnostics enum values
Joel Rosdahl [Tue, 28 Jul 2020 07:04:50 +0000 (09:04 +0200)]
Remove now unused legacy x_strdup function
Joel Rosdahl [Tue, 28 Jul 2020 07:03:05 +0000 (09:03 +0200)]
C++-ify {clone,copy,move}_file
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.
Joel Rosdahl [Mon, 27 Jul 2020 18:26:42 +0000 (20:26 +0200)]
Remove now unused legacy x_strndup function
Joel Rosdahl [Mon, 27 Jul 2020 18:26:07 +0000 (20:26 +0200)]
C++-ify parsing of ccache options
Joel Rosdahl [Mon, 27 Jul 2020 18:04:43 +0000 (20:04 +0200)]
Remove now unused legacy reformat function
Joel Rosdahl [Mon, 27 Jul 2020 18:03:06 +0000 (20:03 +0200)]
C++-ify parse_size_with_suffix
Joel Rosdahl [Mon, 27 Jul 2020 13:25:04 +0000 (15:25 +0200)]
C++-ify subst_env_in_string
Joel Rosdahl [Mon, 27 Jul 2020 07:40:05 +0000 (09:40 +0200)]
Add missing curly braces
Joel Rosdahl [Sun, 26 Jul 2020 19:07:09 +0000 (21:07 +0200)]
Simplify and clean up parse_duration_with_suffix_to_seconds
Joel Rosdahl [Sun, 26 Jul 2020 19:05:30 +0000 (21:05 +0200)]
Move and convert parse_unsigned to Util::parse_uint32
Joel Rosdahl [Sun, 26 Jul 2020 18:20:37 +0000 (20:20 +0200)]
Keep argument lists and function implementations sorted
Joel Rosdahl [Sun, 26 Jul 2020 18:19:45 +0000 (20:19 +0200)]
Improve documentation of --evict-older-than
Joel Rosdahl [Sun, 26 Jul 2020 14:38:57 +0000 (16:38 +0200)]
C++-ify stats functions
Joel Rosdahl [Sun, 26 Jul 2020 14:27:53 +0000 (16:27 +0200)]
C++-ify format_{human_readable_size,parsable_size_with_suffix}
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
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.
Joel Rosdahl [Sat, 25 Jul 2020 17:40:43 +0000 (19:40 +0200)]
Simplify and clean up tests
Joel Rosdahl [Sat, 25 Jul 2020 17:06:47 +0000 (19:06 +0200)]
Move “rewrite dependency target” decision from ArgsInfo to ccache.cpp
As noted in a comment to #592.
ahasselbring [Sat, 25 Jul 2020 19:37:32 +0000 (21:37 +0200)]
Handle clang PCHs (#539) (#624)
Co-authored-by: Cristian Adam <cristian.adam@gmail.com>
Deepak Yadav [Sat, 25 Jul 2020 14:49:33 +0000 (20:19 +0530)]
Share cache for different object file names with -MD/-MMD (#592)
Joel Rosdahl [Sat, 25 Jul 2020 14:01:06 +0000 (16:01 +0200)]
Remove now unused legacy functions related to temporary files
Joel Rosdahl [Sat, 25 Jul 2020 13:56:29 +0000 (15:56 +0200)]
Introduce and use TemporaryFile class
In addition to improving code clarity, this fixes a bug where the
fallback code for “-fdiagnostics-color” tried to operate on a closed
file descriptor.
Joel Rosdahl [Sat, 25 Jul 2020 13:49:11 +0000 (15:49 +0200)]
Add CI job that verifies -DENABLE_TRACING
Joel Rosdahl [Sat, 25 Jul 2020 13:46:40 +0000 (15:46 +0200)]
Make -DENABLE_TRACING work again
Joel Rosdahl [Fri, 24 Jul 2020 18:49:38 +0000 (20:49 +0200)]
Remove now unused legacy create_tmp_file
Joel Rosdahl [Fri, 24 Jul 2020 18:18:22 +0000 (20:18 +0200)]
Look for the correct phrase when detecting unsupported GCC color option
The implementation from #596 uses the spelling “command-line” instead of
“command line” (which is what is actually emitted by GCC and specified
in #224).
Joel Rosdahl [Fri, 24 Jul 2020 18:17:43 +0000 (20:17 +0200)]
Make it possible to keep the test directory when running test suite
Joel Rosdahl [Fri, 24 Jul 2020 13:57:08 +0000 (15:57 +0200)]
Remove test directory for skipped test suite
Joel Rosdahl [Tue, 21 Jul 2020 18:21:01 +0000 (20:21 +0200)]
Update NEWS
(cherry picked from commit
4293f48b6670a99eaa1d5701718d8ef3f2ddd70d )
Joel Rosdahl [Tue, 21 Jul 2020 18:14:38 +0000 (20:14 +0200)]
Use apostrophes and citation marks in NEWS.adoc consistently
(cherry picked from commit
d524e19712e832bc9cf3db841c8b5ccd37c0e9f9 )
Joel Rosdahl [Tue, 21 Jul 2020 17:45:58 +0000 (19:45 +0200)]
Allow (require) argument to -Werror for NVCC
Fixes #598.
(cherry picked from commit
c5349149864104146dab2c9bcd67a1b2ff565f06 )
Joel Rosdahl [Tue, 21 Jul 2020 13:00:59 +0000 (15:00 +0200)]
Add knowledge about -fprofile-{correction,reorder-functions,values}
Fixes #615.
(cherry picked from commit
c1bf116630f22952732feeffaa71b827c1e813bd )
Joel Rosdahl [Sun, 19 Jul 2020 18:47:55 +0000 (20:47 +0200)]
Handle EINTR properly in Result::Writer::write_embedded_file_entry
Joel Rosdahl [Fri, 17 Jul 2020 17:46:40 +0000 (19:46 +0200)]
Avoid some format/free usage
Joel Rosdahl [Fri, 17 Jul 2020 16:28:36 +0000 (18:28 +0200)]
Remove no longer needed cleanup of CACHEDIR.TAG in $CCACHE_DIR
The cleanup functionality was added in 3.2 and it should be safe to
assume that it has performed its task for almost everybody now.
Joel Rosdahl [Thu, 16 Jul 2020 15:09:13 +0000 (17:09 +0200)]
Remove now unused legacy util functions
Joel Rosdahl [Fri, 17 Jul 2020 11:33:08 +0000 (13:33 +0200)]
Remove usage of x_strdup
Joel Rosdahl [Fri, 17 Jul 2020 11:28:45 +0000 (13:28 +0200)]
Use Util::dir_name instead of legacy dir_name function
Joel Rosdahl [Fri, 17 Jul 2020 11:19:15 +0000 (13:19 +0200)]
Use Util::read_file instead of legacy read_file function
Joel Rosdahl [Fri, 17 Jul 2020 11:17:25 +0000 (13:17 +0200)]
Add size_hint parameter to Util::read_file
Similar to the legacy read_file’s size_hint parameter.
Joel Rosdahl [Fri, 17 Jul 2020 17:37:48 +0000 (19:37 +0200)]
Let Util::write_file default to binary mode
That makes more sense since that’s how it’s used in practice.
Joel Rosdahl [Thu, 16 Jul 2020 15:08:28 +0000 (17:08 +0200)]
Use Util::read_file instead of legacy read_text_file
Joel Rosdahl [Thu, 16 Jul 2020 15:03:52 +0000 (17:03 +0200)]
C++-ify format_command and print_command and move to where used
Joel Rosdahl [Thu, 16 Jul 2020 14:52:47 +0000 (16:52 +0200)]
C++-ify logging routines
Joel Rosdahl [Thu, 16 Jul 2020 14:36:46 +0000 (16:36 +0200)]
Use File wrapper for static log file object
This flushes and closes the underlying FILE object properly on exit.
Joel Rosdahl [Tue, 14 Jul 2020 13:56:31 +0000 (15:56 +0200)]
Create test directories in testdir and remove it on “make clean”
Joel Rosdahl [Tue, 14 Jul 2020 13:08:22 +0000 (15:08 +0200)]
Probe assembler for supported -m* flags
Since CMake uses the assembler executable for compiling assembler source
code it’s not quite correct to probe the C++ compiler (nor the C
compiler) since it may not be the same as the assembler.
Fixes #625.
Joel Rosdahl [Mon, 13 Jul 2020 20:22:16 +0000 (22:22 +0200)]
Improve instructions on how to install libzstd
Joel Rosdahl [Mon, 13 Jul 2020 20:01:13 +0000 (22:01 +0200)]
Update Travis-CI badge URL to travis-ci.com
Joel Rosdahl [Mon, 13 Jul 2020 18:01:46 +0000 (20:01 +0200)]
Remove now unused get_extension function
Joel Rosdahl [Mon, 13 Jul 2020 17:51:45 +0000 (19:51 +0200)]
C++-ify win32getshell
Joel Rosdahl [Mon, 13 Jul 2020 17:49:44 +0000 (19:49 +0200)]
Make Util::to_lowercase work on nonstd::string_view
Joel Rosdahl [Mon, 13 Jul 2020 17:48:50 +0000 (19:48 +0200)]
Only dump log buffer in cc_dump_debug_log_buffer if it exists
This can happen in unit tests.
Joel Rosdahl [Mon, 13 Jul 2020 17:42:24 +0000 (19:42 +0200)]
Make is_precompiled_header handle the empty string
Related to PR #624.
Joel Rosdahl [Mon, 13 Jul 2020 11:39:45 +0000 (13:39 +0200)]
Remove dependency on std::regex
std::regex is not available for GCC 4.8. It’s also a bit bloated. The
reason for not using POSIX regex functionality is that it’s not
available in MinGW.
Joel Rosdahl [Thu, 9 Jul 2020 19:37:40 +0000 (21:37 +0200)]
Improve -x/--show-compression output
Joel Rosdahl [Thu, 9 Jul 2020 19:01:01 +0000 (21:01 +0200)]
Handle EINTR correctly in copy_fd
Joel Rosdahl [Thu, 9 Jul 2020 18:57:00 +0000 (20:57 +0200)]
Remove more short read optimization from #551
In addition to the removal done in
4b71108612f7 .
Joel Rosdahl [Wed, 8 Jul 2020 07:51:10 +0000 (09:51 +0200)]
C++-ify struct hash
Joel Rosdahl [Thu, 9 Jul 2020 18:22:25 +0000 (20:22 +0200)]
Simplify code somewhat
Ryan Egesdahl [Thu, 9 Jul 2020 18:17:54 +0000 (11:17 -0700)]
Add ability to ignore specified compiler options when hashing (#620)
Closes #578.
Joel Rosdahl [Wed, 8 Jul 2020 18:38:11 +0000 (20:38 +0200)]
Make “misc/format-files --check” exit with error code on error
Regression in
ee332b44a098f8603c05a25e09168b6b5b9c96ae .
(cherry picked from commit
ea5379c6e8a39605d71b52d01c4244ea8aeeae48 )
Joel Rosdahl [Fri, 8 May 2020 19:27:23 +0000 (21:27 +0200)]
Switch to doctest from Catch2 for tests
doctest is more light-weight than Catch2 and compiles faster.
Joel Rosdahl [Wed, 8 Jul 2020 07:54:50 +0000 (09:54 +0200)]
Remove short read optimization from #551
I don’t feel confident about assuming that a short read for a file means
EOF in all situations. For instance, it looks like short reads can
happen of an NFS file system mounted with the “intr” option, and it can
also happen if a file entry actually is a named pipe.
Joel Rosdahl [Tue, 7 Jul 2020 17:46:21 +0000 (19:46 +0200)]
Improve .clang-tidy HeaderFilterRegex patterns
The pattern for unittest now excludes third_party headers as well.
Joel Rosdahl [Tue, 7 Jul 2020 14:35:54 +0000 (16:35 +0200)]
Make Result::write_embedded_file_entry static
Joel Rosdahl [Mon, 6 Jul 2020 20:19:36 +0000 (22:19 +0200)]
Remove unneeded include in unittest/TestUtil.hpp