]>
git.ipfire.org Git - thirdparty/ccache.git/log
Orgad Shaneh [Fri, 25 Mar 2022 14:27:39 +0000 (17:27 +0300)]
fix: Do not add redundant newlines for stdout
Tokenizer is used with include_empty, and the output typically ends with
\n.
For each line, tokenizer returns it without the \n, and the function
appends
it. But if the output ends with \n, the tokenizer returns an additional
empty string, and a redundant LF is written to stdout.
Another issue can be if the last line of the original output doesn't end
with \n at all, ccache added it anyway.
It was probably unnoticed until now since gcc has no output at all, while
cl outputs the source file name.
Orgad Shaneh [Fri, 25 Mar 2022 14:27:39 +0000 (17:27 +0300)]
feat: Support preserving the delimiters on tokenizer
Orgad Shaneh [Sun, 27 Mar 2022 12:14:10 +0000 (15:14 +0300)]
test: Simplify tokenizer tests
Joel Rosdahl [Sun, 3 Apr 2022 08:50:43 +0000 (10:50 +0200)]
fix: Only use /run/user/<UID>/ccache-tmp if writable
The fix for #984 addressed a problem when /run/user/0 already exists and
ccache is run with fakeroot. However, it didn’t handle the case when
/run/user/0/ccache-tmp already exists, which will happen for instance if
the real root user has run ccache at least once.
Fix this by using access(2) to verify that the ccache-tmp directory is
writable. Note: Can’t just check the mode bits of the directory since
they appear OK since fakeroot fakes the UID.
Fixes #1044.
Rafael Kitover [Sun, 3 Apr 2022 07:16:12 +0000 (07:16 +0000)]
fix: Add ASM and ASM_MASM to project() languages (#1043)
Joel Rosdahl [Sun, 3 Apr 2022 06:59:46 +0000 (08:59 +0200)]
fix: Improve handling of .gcno files
When support for caching a compilation with coverage (producing a .gcno
file), the commit[1] made sure to avoid rewriting the input path to
relative with the motivation “also make sure to use the source file
path, since this is in the notes”. However, this seems to be unnecessary
since a relative input file path will be written as is to the .gcno, not
the absolute path. This is the case for at least GCC 4.7+ and Clang
3.6+. Fix this by potentially converting the input path to relative even
when generating coverage.
When investigating the above issue, I noticed that GCC 9+ includes the
current working directory (CWD) in the .gcno file. This means that we
have include the CWD in the hash when compiling with
-ftest-coverage/--coverage in order to replicate what the compiler would
produce. Since this makes it impossible get cache hits when compiling in
different directories, a new gcno_cwd sloppiness has been added for
opting out of hashing the CWD, with the tradeoff of potentially getting
an incorrect directory in the .gcno file.
[1]:
02d3f078bd2495b8db2264ae0b2c692b4c5ba1bd
Fixes #1032.
Joel Rosdahl [Thu, 31 Mar 2022 19:17:32 +0000 (21:17 +0200)]
refactor: Sort sloppiness parsing/generation
Joel Rosdahl [Sun, 27 Mar 2022 10:57:24 +0000 (12:57 +0200)]
chore: Disable some clang-tidy checks that don’t contribute much
vsplesk [Sun, 27 Mar 2022 07:57:54 +0000 (09:57 +0200)]
docs: Add reference to reference build configs (#1031)
Joel Rosdahl [Sat, 26 Mar 2022 11:20:32 +0000 (12:20 +0100)]
fix: Bail out on too hard MSVC environment variables CL and _CL_
To handle the CL and _CL_ variables properly, ccache needs to parse them
according to [1] and then include the compiler options as part of
regular argument processing. Until that is done we have to bail out and
just run the original compiler.
[1]: https://docs.microsoft.com/en-us/cpp/build/reference/cl-environment-variables?view=msvc-170
Fixes #1022.
Joel Rosdahl [Sat, 26 Mar 2022 09:28:44 +0000 (10:28 +0100)]
fix: Prefer CMake find module for hiredis package
Joel Rosdahl [Sat, 26 Mar 2022 09:10:04 +0000 (10:10 +0100)]
refactor: Simplify string append in process_arg
Joel Rosdahl [Sat, 26 Mar 2022 08:56:29 +0000 (09:56 +0100)]
chore: Improve error message for read error in from_cache
Cristian Adam [Sat, 26 Mar 2022 09:24:09 +0000 (10:24 +0100)]
fix: Prefer CMake find module for zstd package (#1030)
Orgad Shaneh [Sat, 26 Mar 2022 09:08:13 +0000 (12:08 +0300)]
feat: Support directory for MSVC -Fo option (#1019)
6d5CfLQ3dYAb [Sat, 26 Mar 2022 08:55:40 +0000 (01:55 -0700)]
fix: Don't exit with error on read failure from cached file (#1036)
Joel Rosdahl [Thu, 24 Mar 2022 20:17:17 +0000 (21:17 +0100)]
fix: Don’t cache preexisting object file when using -fsyntax-only
Fixes #1034.
6d5CfLQ3dYAb [Wed, 23 Mar 2022 20:07:50 +0000 (13:07 -0700)]
fix: Authenticate with Redis before database selection (#1020)
Joel Rosdahl [Sat, 19 Mar 2022 19:23:21 +0000 (20:23 +0100)]
fix: Work around endianness problem in Util::read_text_file
The code in Util::read_text_file for converting UTF-16LE to UTF-8 only
works on little-endian machines. This makes the unit test fail on
big-endian machines.
Since the conversion is only needed on Windows (for Visual Studio, which
creates UTF-16LE .rsp files) in practice, work around the problem by
only doing the conversion in Windows builds.
Fixes #1014.
Joel Rosdahl [Sun, 13 Mar 2022 12:34:37 +0000 (13:34 +0100)]
test: Don’t require C++-capable compiler for the test suite
Joel Rosdahl [Mon, 28 Feb 2022 06:25:55 +0000 (07:25 +0100)]
docs: Add missing word in release notes
Joel Rosdahl [Sun, 27 Feb 2022 19:45:21 +0000 (20:45 +0100)]
chore: Prepare for v4.6
Joel Rosdahl [Sun, 27 Feb 2022 19:41:57 +0000 (20:41 +0100)]
chore: Update NEWS
Joel Rosdahl [Sun, 27 Feb 2022 19:41:29 +0000 (20:41 +0100)]
style: Add missing newline at end of file
Joel Rosdahl [Sun, 27 Feb 2022 19:34:32 +0000 (20:34 +0100)]
chore: Sort codespell allowlist
Joel Rosdahl [Sun, 27 Feb 2022 19:11:47 +0000 (20:11 +0100)]
refactor: Make Util::is_absolute_path_with_prefix return optional
Joel Rosdahl [Sun, 27 Feb 2022 19:11:07 +0000 (20:11 +0100)]
style: Tweak comments
Joel Rosdahl [Sun, 27 Feb 2022 13:09:43 +0000 (14:09 +0100)]
chore: Improve hint in source code format error message
Joel Rosdahl [Tue, 22 Feb 2022 20:55:02 +0000 (21:55 +0100)]
fix: Don’t increment direct_cache_miss for forced recache
Marius Zwicker [Sun, 27 Feb 2022 18:56:44 +0000 (19:56 +0100)]
fix: Make conversion to relative paths more reliable on Windows (#1011)
Joel Rosdahl [Mon, 21 Feb 2022 19:45:58 +0000 (20:45 +0100)]
chore: Add Vili Väinölä to .mailmap
Joel Rosdahl [Sun, 20 Feb 2022 15:26:40 +0000 (16:26 +0100)]
fix: Hash object file directory for MSVC compilers
The object file produced by MSVC includes the full path to the object
file even without debug flags.
Joel Rosdahl [Sun, 20 Feb 2022 15:10:11 +0000 (16:10 +0100)]
bump: Upgrade to BLAKE3 1.3.1
Joel Rosdahl [Sun, 20 Feb 2022 10:11:53 +0000 (11:11 +0100)]
docs: Tweak hard link config option description
Joel Rosdahl [Sat, 19 Feb 2022 16:02:23 +0000 (17:02 +0100)]
fix: Respect umask when making hard linked files read only
Fixes #1007.
Joel Rosdahl [Sat, 19 Feb 2022 15:52:26 +0000 (16:52 +0100)]
refactor: Extract get_umask function to Util
Joel Rosdahl [Sat, 19 Feb 2022 15:24:36 +0000 (16:24 +0100)]
chore: Touch up Util::read_text_file code
vvainola [Sat, 19 Feb 2022 15:22:16 +0000 (17:22 +0200)]
fix: Support UTF-16LE .rsp files (#1005)
Philipp Gortan [Tue, 15 Feb 2022 19:41:24 +0000 (20:41 +0100)]
docs: Add documentation that compiler plugins are hashed too (#1006)
Joel Rosdahl [Mon, 7 Feb 2022 19:36:47 +0000 (20:36 +0100)]
feat: Remove automatic enabling of ccache for ccache build
When enabling ccache using the standard recommended method (via PATH or
via masquerading symlinks), UseCcache.cmake will introduce double
invocations of ccache. I find this a bit annoying and I also think that
it should be up to the user to enable or not enable ccache and which
settings to use.
Joel Rosdahl [Mon, 7 Feb 2022 19:31:02 +0000 (20:31 +0100)]
chore: Remove obsolete GCC 4.8 workarounds
Joel Rosdahl [Mon, 7 Feb 2022 19:20:08 +0000 (20:20 +0100)]
fix: Ensure that raw filenames are static in length
PrimaryStorage::evict assumes that the entry number is encoded in the
filename as one character, so make sure that this precondition holds in
Result::{Reader,Writer} as well.
Joel Rosdahl [Sat, 5 Feb 2022 18:48:59 +0000 (19:48 +0100)]
refactor: Clean up code related to -Fp/-Yu with concatenated path
Orgad Shaneh [Thu, 3 Feb 2022 20:19:55 +0000 (22:19 +0200)]
fix: Fix clang-cl display name (#1003)
Joel Rosdahl [Thu, 3 Feb 2022 19:49:11 +0000 (20:49 +0100)]
style: Improve names related to clang-cl
Joel Rosdahl [Thu, 3 Feb 2022 19:48:12 +0000 (20:48 +0100)]
docs: Add missing documentation of compiler type “clang-cl”
Joel Rosdahl [Thu, 3 Feb 2022 08:57:08 +0000 (09:57 +0100)]
fix: Don’t finalize ZstdCompressor twice
This fixes an issue with older libzstd versions, which don’t like when
you continue writing data to a stream after calling ZSTD_endStream.
Orgad Shaneh [Thu, 3 Feb 2022 19:38:31 +0000 (21:38 +0200)]
feat: Add support for clang-cl (#993)
Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
Delgan [Fri, 28 Jan 2022 18:28:15 +0000 (19:28 +0100)]
feat: Add option to use Bearer token with HTTP backend (#1001)
Joel Rosdahl [Thu, 27 Jan 2022 19:15:29 +0000 (20:15 +0100)]
bump: Upgrade to cpp-httplib 0.10.2
Joel Rosdahl [Thu, 27 Jan 2022 19:10:05 +0000 (20:10 +0100)]
feat: Enable HTTP keep-alive by default (#1000)
Joel Rosdahl [Mon, 24 Jan 2022 19:24:16 +0000 (20:24 +0100)]
feat: Add --inspect option instead of --dump-manifest/--dump-result
“Inspect” sounds more appropriate than “dump” for viewing metadata of
cache files. Also, it’s convenient to have one option instead of two
different.
Joel Rosdahl [Thu, 30 Dec 2021 12:29:18 +0000 (13:29 +0100)]
enhance: Add File::File(FILE*) constructor
Orgad Shaneh [Mon, 24 Jan 2022 17:07:20 +0000 (19:07 +0200)]
fix: Do not handle -o<file> for MSVC (#994)
Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
Joel Rosdahl [Sun, 23 Jan 2022 19:58:56 +0000 (20:58 +0100)]
bump: Upgrade to BLAKE3 1.3.0
Joel Rosdahl [Sun, 23 Jan 2022 19:35:30 +0000 (20:35 +0100)]
bump: Upgrade to fmt 8.1.1
Joel Rosdahl [Sun, 23 Jan 2022 19:33:01 +0000 (20:33 +0100)]
bump: Upgrade to doctest 2.4.8
Joel Rosdahl [Sun, 23 Jan 2022 19:29:27 +0000 (20:29 +0100)]
bump: Upgrade to zstd 1.5.2
Joel Rosdahl [Sun, 23 Jan 2022 19:27:03 +0000 (20:27 +0100)]
feat: Detect MSVC compiler case insensitive and with exact match
Joel Rosdahl [Sun, 23 Jan 2022 15:55:40 +0000 (16:55 +0100)]
feat: Make it possible to configure compiler type msvc
Joel Rosdahl [Sun, 23 Jan 2022 15:54:30 +0000 (16:54 +0100)]
refactor: Rename compiler type cl to msvc
Joel Rosdahl [Thu, 20 Jan 2022 19:57:09 +0000 (20:57 +0100)]
fix: Ensure existing directory before copying from secondary storage
Fixes #998.
Joel Rosdahl [Wed, 19 Jan 2022 18:59:18 +0000 (19:59 +0100)]
doc: Fix typo and missing word
Joel Rosdahl [Mon, 17 Jan 2022 17:47:24 +0000 (18:47 +0100)]
test: Verify -fsyntax-only handling without -c
Joel Rosdahl [Mon, 17 Jan 2022 17:46:45 +0000 (18:46 +0100)]
refactor: Simplify -fsyntax-only logic
Orgad Shaneh [Mon, 17 Jan 2022 17:41:15 +0000 (19:41 +0200)]
feat: Add support for MSVC's -Zs option (#995)
Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
Anders Björklund [Mon, 17 Jan 2022 17:23:17 +0000 (18:23 +0100)]
Fix upload-redis after cache entry format change (#973)
Orgad Shaneh [Sun, 16 Jan 2022 17:51:55 +0000 (19:51 +0200)]
feat: Support MSVC /Yu option (compiling with PCH) (#991)
Co-authored-by: Luboš Luňák <l.lunak@centrum.cz>
Joel Rosdahl [Mon, 10 Jan 2022 21:22:08 +0000 (22:22 +0100)]
fix: Unconstify variable to allow automatic move
As suggested by Clang-Tidy.
Joel Rosdahl [Sun, 9 Jan 2022 21:13:02 +0000 (22:13 +0100)]
fix: Make src/ccache.cpp cacheable by ccache itself
“.incbin” should not be present verbatim in the source code since that
makes ccache consider the code uncacheable.
Regression in
2d2de82bb9231b981b40486b093a2c0002200c40 .
Joel Rosdahl [Mon, 10 Jan 2022 20:13:31 +0000 (21:13 +0100)]
doc: Improve documentation of --config-path
See also discussion #986.
Orgad Shaneh [Mon, 10 Jan 2022 19:56:59 +0000 (21:56 +0200)]
Fix stats output for secondary storage (#988)
Joel Rosdahl [Thu, 6 Jan 2022 15:57:00 +0000 (16:57 +0100)]
fix: Check writability of /run/user/<UID>/ccache-tmp before using
Closes #984.
Joel Rosdahl [Wed, 29 Dec 2021 19:50:29 +0000 (20:50 +0100)]
refactor: Decouple Manifest data structure from how it’s stored
Manifest is now a standalone data structure that knows how to serialize
and deserialize itself but not how it’s embedded in a cache entry.
Joel Rosdahl [Wed, 29 Dec 2021 15:26:32 +0000 (16:26 +0100)]
bump: Upgrade to xxHash 0.8.1
Joel Rosdahl [Wed, 29 Dec 2021 15:21:32 +0000 (16:21 +0100)]
bump: Upgrade to cpp-httplib 0.10.1
Joel Rosdahl [Wed, 29 Dec 2021 14:23:35 +0000 (15:23 +0100)]
test: Improve code style
Joel Rosdahl [Wed, 29 Dec 2021 13:58:20 +0000 (14:58 +0100)]
style: Avoid operator++ in expression
Alexey Sheplyakov [Wed, 29 Dec 2021 14:20:11 +0000 (18:20 +0400)]
fix: Avoid .incbin false positive (#983)
Steve Mokris [Wed, 29 Dec 2021 13:56:45 +0000 (08:56 -0500)]
fix: Remove duplicate -Xarch second argument (#981)
Joel Rosdahl [Sun, 19 Dec 2021 20:11:49 +0000 (21:11 +0100)]
style: Add some comments and tweaks
R. Voggenauer [Sun, 19 Dec 2021 20:07:58 +0000 (21:07 +0100)]
fix: Fix copying of binary files on Windows (#979)
Joel Rosdahl [Sun, 19 Dec 2021 15:38:36 +0000 (16:38 +0100)]
fix: Don’t run trim_dir test suite unless cleanup tests are enabled
Fixes #974.
Joel Rosdahl [Sun, 12 Dec 2021 20:12:22 +0000 (21:12 +0100)]
refactor: Move conversion to slash option outside file test
Joel Rosdahl [Sun, 12 Dec 2021 20:10:39 +0000 (21:10 +0100)]
refactor: Remove redundant conditions for MSVC options
Joel Rosdahl [Sun, 12 Dec 2021 19:41:36 +0000 (20:41 +0100)]
fix: Handle stdout from distcc-pump when used as a prefix
The compiler guessing doesn’t work if pump is used as a
prefix/CCACHE_PREFIX, so let’s just not depend on such guesswork.
Also, since the distcc-pump wrapper isn’t really a compiler type, it
actually makes sense not to treat it as such.
Joel Rosdahl [Sun, 12 Dec 2021 19:29:38 +0000 (20:29 +0100)]
feat: Support caching stdout for all compiler types
Joel Rosdahl [Thu, 9 Dec 2021 20:10:10 +0000 (21:10 +0100)]
enhance: Add Result::write_data method
Luboš Luňák [Sun, 12 Dec 2021 20:15:21 +0000 (21:15 +0100)]
fix: MSVC's -link option is too hard (#972)
Luboš Luňák [Sun, 12 Dec 2021 20:09:40 +0000 (21:09 +0100)]
fix: Handle MSVC flags -MD[d], -MT[d] and -LT[d] properly (#971)
Luboš Luňák [Sun, 12 Dec 2021 20:03:47 +0000 (21:03 +0100)]
Fix and simplify handling of options for MSVC (#954)
Luboš Luňák [Sun, 12 Dec 2021 19:57:10 +0000 (20:57 +0100)]
Add support for caching stdout from MSVC (#962)
Luboš Luňák [Tue, 30 Nov 2021 19:47:14 +0000 (20:47 +0100)]
fix: Ignore CCACHE_NOCPP2=1 with MSVC (#970)
Joel Rosdahl [Fri, 26 Nov 2021 19:27:56 +0000 (20:27 +0100)]
doc: Correct reference to the debug_dir option
Joel Rosdahl [Wed, 24 Nov 2021 20:26:12 +0000 (21:26 +0100)]
refactor: Simplify code related to send_to_fd
Joel Rosdahl [Wed, 24 Nov 2021 20:25:41 +0000 (21:25 +0100)]
fix: Correct error message in send_to_fd
Joel Rosdahl [Wed, 24 Nov 2021 20:17:58 +0000 (21:17 +0100)]
Merge pull request #968 from jhnc-oss/fix-newline-on-windows
Luboš Luňák [Mon, 1 Nov 2021 12:37:11 +0000 (12:37 +0000)]
fix: handle newlines on Windows properly
Luboš Luňák [Tue, 23 Nov 2021 18:35:46 +0000 (19:35 +0100)]
fix: Use default object file extension .obj for MSVC (#964)
Luboš Luňák [Tue, 23 Nov 2021 18:33:34 +0000 (19:33 +0100)]
fix: Make AVX2 code work also with MSVC (#963)