]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
7 weeks agofix: Fix crash on HTTP request failure (#1628)
autoantwort [Wed, 3 Sep 2025 18:01:43 +0000 (20:01 +0200)] 
fix: Fix crash on HTTP request failure (#1628)

If the request fails and `result.error() != Error::Success` `result->` can return
a `nullptr` resulting in a null pointer dereference.

Co-authored-by: Leander Schulten <Leander.Schulten@tetys.de>
7 weeks agofix: Fix bad conversion from UTF-16 in util::read_file on Windows (#1627)
autoantwort [Wed, 3 Sep 2025 17:39:13 +0000 (19:39 +0200)] 
fix: Fix bad conversion from UTF-16 in util::read_file on Windows (#1627)

When interpreting a char* string that is null terminated as wchar* string
it is not guaranteed that the wchar* string is also null terminated. A char[3]
string/memeory region with the content ['a', '\0', '\0', 100] interpreted as
wchar* has no ending null character resulting in out of bounds memory reads
when trying to construct a std::wstring from it.

Co-authored-by: Leander Schulten <Leander.Schulten@tetys.de>
7 weeks agoci: Add jobs to build and create release
Joel Rosdahl [Sat, 30 Aug 2025 10:39:55 +0000 (12:39 +0200)] 
ci: Add jobs to build and create release

This includes new binary releases for Linux aarch64 and Windows aarch64.

Closes #1579. See also discussion #1310.

8 weeks agoci: Add artifact retention
Joel Rosdahl [Sun, 31 Aug 2025 08:28:12 +0000 (10:28 +0200)] 
ci: Add artifact retention

8 weeks agoci: Verify llvm-mingw toolchain download
Joel Rosdahl [Wed, 27 Aug 2025 19:03:43 +0000 (21:03 +0200)] 
ci: Verify llvm-mingw toolchain download

8 weeks agoci: Rename binary jobs to common "-binary" suffix
Joel Rosdahl [Wed, 27 Aug 2025 19:03:03 +0000 (21:03 +0200)] 
ci: Rename binary jobs to common "-binary" suffix

8 weeks agoci: Add traces to CI jobs to make debug cycle shorter
Joel Rosdahl [Wed, 27 Aug 2025 18:57:45 +0000 (20:57 +0200)] 
ci: Add traces to CI jobs to make debug cycle shorter

8 weeks agobuild: Improve installation of documentation
Joel Rosdahl [Wed, 27 Aug 2025 18:53:45 +0000 (20:53 +0200)] 
build: Improve installation of documentation

- Make HTML and man page part of "cmake --install".
- Make modifications of man page in-place to avoid leaving a .tmp file
  behind.

8 weeks agoci: Rename macOS to Darwin in CI context
Joel Rosdahl [Wed, 27 Aug 2025 18:46:45 +0000 (20:46 +0200)] 
ci: Rename macOS to Darwin in CI context

8 weeks agoci: Rename macOS binary jobs to match others
Joel Rosdahl [Sun, 17 Aug 2025 12:23:47 +0000 (14:23 +0200)] 
ci: Rename macOS binary jobs to match others

8 weeks agoci: Add documentation build job
Joel Rosdahl [Sun, 17 Aug 2025 12:21:23 +0000 (14:21 +0200)] 
ci: Add documentation build job

8 weeks agoci: Run on ubuntu-24.04 instead of ubuntu-latest
Joel Rosdahl [Fri, 15 Aug 2025 15:23:51 +0000 (17:23 +0200)] 
ci: Run on ubuntu-24.04 instead of ubuntu-latest

I prefer to avoid *-latest tags.

8 weeks agoci: Improve binary build jobs
Joel Rosdahl [Sun, 10 Aug 2025 08:56:19 +0000 (10:56 +0200)] 
ci: Improve binary build jobs

For x86_64, build in an Alma Linux 8 container since RHEL 8 is the
oldest still active LTS mainstream Linux distribution to my knowledge.

For aarch64, cross compile in an x86_64 environment instead of in a
native aarch64 environment. This is because I want to be able to build
release binaries locally on my x86_64 machine if there is some problem
with the CI environment and it feels good to match that in CI. The build
is still on Ubuntu 22.04 – I made a quick attempt to get
cross-compilation working in Alma Linux 8 working but gave up.

8 weeks agoci: Bump to newer codespell and typos versions
Joel Rosdahl [Sun, 31 Aug 2025 08:24:12 +0000 (10:24 +0200)] 
ci: Bump to newer codespell and typos versions

2 months agobuild: Detect ccache version from GitHub Actions environment
Joel Rosdahl [Fri, 8 Aug 2025 18:33:41 +0000 (20:33 +0200)] 
build: Detect ccache version from GitHub Actions environment

2 months agorefactor: Use std::array instead of const char* array (#1623)
autoantwort [Thu, 21 Aug 2025 19:26:17 +0000 (21:26 +0200)] 
refactor: Use std::array instead of const char* array (#1623)

2 months agofeat: Add support for multiple directories in base_dir/CCACHE_BASEDIR
Joel Rosdahl [Sat, 16 Aug 2025 19:09:19 +0000 (21:09 +0200)] 
feat: Add support for multiple directories in base_dir/CCACHE_BASEDIR

Closes #597.

2 months agoenhance: Add util::join_path_list
Joel Rosdahl [Sat, 16 Aug 2025 19:07:29 +0000 (21:07 +0200)] 
enhance: Add util::join_path_list

2 months agoenhance: Implement util::to_string(const fs::path&)
Joel Rosdahl [Sat, 16 Aug 2025 19:06:39 +0000 (21:06 +0200)] 
enhance: Implement util::to_string(const fs::path&)

2 months agochore: Improve comments
Joel Rosdahl [Mon, 11 Aug 2025 18:22:24 +0000 (20:22 +0200)] 
chore: Improve comments

2 months agodocs: Reflow long line in manual
Joel Rosdahl [Mon, 11 Aug 2025 18:50:21 +0000 (20:50 +0200)] 
docs: Reflow long line in manual

2 months agofix: Support wide characters in filenames for MSVC
Joel Rosdahl [Wed, 13 Aug 2025 17:36:53 +0000 (19:36 +0200)] 
fix: Support wide characters in filenames for MSVC

Fixes #1619.

2 months agochore: Improve ccache.exe.manifest.in structure
Joel Rosdahl [Wed, 13 Aug 2025 17:36:27 +0000 (19:36 +0200)] 
chore: Improve ccache.exe.manifest.in structure

2 months agochore: Downgrade clang-format to 18.1.3, matching Ubuntu 24.04
Joel Rosdahl [Thu, 14 Aug 2025 19:51:07 +0000 (21:51 +0200)] 
chore: Downgrade clang-format to 18.1.3, matching Ubuntu 24.04

2 months agoci: Enable tests in the msys2 mingw64+clang configuration (#1618)
Martin Storsjö [Tue, 12 Aug 2025 18:10:40 +0000 (21:10 +0300)] 
ci: Enable tests in the msys2 mingw64+clang configuration (#1618)

Instead of disabling tests altogether, pass the -Wno-deprecated
option, working around https://github.com/doctest/doctest/issues/900
in a different fashion.

2 months agoci: Disable Windows MSYS2 clangarm64 job for now
Joel Rosdahl [Tue, 12 Aug 2025 17:55:22 +0000 (19:55 +0200)] 
ci: Disable Windows MSYS2 clangarm64 job for now

The job occasionally crashes with an "Exception: SegFault" message,
perhaps from CTest?

See #1618.

2 months agochore: Modernize Python code in test/http-*
Joel Rosdahl [Fri, 8 Aug 2025 11:10:56 +0000 (13:10 +0200)] 
chore: Modernize Python code in test/http-*

2 months agotest: Fix detection of test suites in test/run
Joel Rosdahl [Wed, 6 Aug 2025 20:10:27 +0000 (22:10 +0200)] 
test: Fix detection of test suites in test/run

Broke in 9da7c09c9390b2db5c745a8dad58d7a3ac3af9b0.

2 months agofix: Redact URLs logged by remote http backend
Joel Rosdahl [Fri, 8 Aug 2025 11:06:38 +0000 (13:06 +0200)] 
fix: Redact URLs logged by remote http backend

2 months agodocs: Mention that #pragma once could be problematic with PCH
Joel Rosdahl [Wed, 6 Aug 2025 16:52:28 +0000 (18:52 +0200)] 
docs: Mention that #pragma once could be problematic with PCH

Fixes #1615.

2 months agorefactor: Improve name and type of only_if_missing parameter
Joel Rosdahl [Wed, 6 Aug 2025 14:55:35 +0000 (16:55 +0200)] 
refactor: Improve name and type of only_if_missing parameter

2 months agoMerge pull request #1598 from mstorsjo/ci-arm
Joel Rosdahl [Tue, 5 Aug 2025 17:48:26 +0000 (19:48 +0200)] 
Merge pull request #1598 from mstorsjo/ci-arm

2 months agoci: Add jobs for building binaries for Windows and Linux 1598/head
Martin Storsjö [Tue, 10 Jun 2025 10:53:41 +0000 (13:53 +0300)] 
ci: Add jobs for building binaries for Windows and Linux

Build binaries for x86_64 and aarch64 on Linux, and i686, x86_64
and aarch64 for Windows.

The Windows binaries are cross compiled from Linux. For x86, it
uses distro provided compilers, while it uses llvm-mingw installed
separately for targeting aarch64. (Most distros don't have packages
for mingw cross compilers for targeting Windows on aarch64 yet. GCC
isn't mature for this target yet, but Clang has supported this
target for many years now. Llvm-mingw is essentially the same toolchain
setup as MSYS2 uses in their clangarm64 environment, but available
as a standalone cross compiler too.)

2 months agoci: Add a toolchain file for (cross) compilation for aarch64-w64-mingw32
Martin Storsjö [Wed, 30 Jul 2025 09:05:22 +0000 (12:05 +0300)] 
ci: Add a toolchain file for (cross) compilation for aarch64-w64-mingw32

Contrary to the existing toolchain files, this doesn't hardcode
CMAKE_FIND_ROOT_PATH to a location in /usr, but locates the
compiler from the path, and picks a sysroot adjacent to it - allowing
using a compiler installed in any path.

This uses a compiler named "${TOOLCHAIN_PREFIX}-gcc" - toolchains
such as llvm-mingw do provide cross tools named "-gcc" for
compatibility, even if they use Clang.

2 months agoci: Run build_and_test on Linux on ARM too
Martin Storsjö [Tue, 10 Jun 2025 10:40:32 +0000 (13:40 +0300)] 
ci: Run build_and_test on Linux on ARM too

2 months agoci: Run the Windows VS2022 ARM64 MSBuild tests on actual ARM hardware
Martin Storsjö [Tue, 10 Jun 2025 10:33:03 +0000 (13:33 +0300)] 
ci: Run the Windows VS2022 ARM64 MSBuild tests on actual ARM hardware

2 months agoci: Extend the msys2 testing to the "clangarm64" environment
Martin Storsjö [Tue, 10 Jun 2025 10:31:42 +0000 (13:31 +0300)] 
ci: Extend the msys2 testing to the "clangarm64" environment

The clangarm64 msys environment doesn't have a "gcc" command
by default, unless the "gcc-compat" package is installed.

One may consider using "cc" as well, which is available when
the "toolchain" package is installed in each environment, but
that tool in clang environments fails the "direct" test case.

2 months agoci: Use pacboy to simplify installation of msys2 packages
Martin Storsjö [Tue, 10 Jun 2025 10:28:53 +0000 (13:28 +0300)] 
ci: Use pacboy to simplify installation of msys2 packages

See [1] and [2] for reference on using pacboy to simplify installing
mingw packages in msys2. The relevant bit to know is that by
specifying plain package names with a ":p" suffix, in the "pacboy"
section in msys2/setup-msys2, those packages are installed within
the current msys2 environment.

This avoids needing to specify the long package prefix like
"mingw-w64-x86_64". For other environments like "ucrt64", "clang64"
and "clangarm64", the prefix is even longer and less obvious.

[1] https://github.com/msys2/setup-msys2?tab=readme-ov-file#pacboy
[2] https://www.msys2.org/docs/package-naming/#avoiding-writing-long-package-names

2 months agoci: Stop manually installing Ninja on Linux and macOS
Martin Storsjö [Tue, 10 Jun 2025 10:55:00 +0000 (13:55 +0300)] 
ci: Stop manually installing Ninja on Linux and macOS

Since https://github.com/actions/runner-images/pull/11706,
https://github.com/actions/runner-images/pull/11707 and
https://github.com/actions/runner-images/pull/11737, ninja is
preinstalled in the Ubuntu, macOS and x86 Windows runner images.

2 months agorefactor: Use TRY_ASSIGN and TRY
Joel Rosdahl [Tue, 5 Aug 2025 11:42:33 +0000 (13:42 +0200)] 
refactor: Use TRY_ASSIGN and TRY

2 months agofix: Properly make unique temporary name in TRY_ASSIGN
Joel Rosdahl [Tue, 5 Aug 2025 08:48:18 +0000 (10:48 +0200)] 
fix: Properly make unique temporary name in TRY_ASSIGN

2 months agorefactor: Extract macros for creating unique variable names
Joel Rosdahl [Tue, 5 Aug 2025 08:45:41 +0000 (10:45 +0200)] 
refactor: Extract macros for creating unique variable names

2 months agoci: Declare downloaded zstd as EXCLUDE_FROM_ALL
Joel Rosdahl [Sun, 3 Aug 2025 16:04:29 +0000 (18:04 +0200)] 
ci: Declare downloaded zstd as EXCLUDE_FROM_ALL

8648532e3cdcd6a0c4fb12b65e1ca9a8972a1e06 removed usage of
FetchContent_Populate to avoid warnings from newer CMake versions, but
the EXCLUDE_FROM_ALL part got lost in translation.

Corresponding semantics is available by passing EXCLUDE_FROM_ALL to
FetchContent_Declare, but only since CMake 3.28 so we need to add some
backward compatibility goo.

2 months agobuild: Remove obsolete variable in FindZstd.cmake
Joel Rosdahl [Sun, 3 Aug 2025 15:06:48 +0000 (17:06 +0200)] 
build: Remove obsolete variable in FindZstd.cmake

2 months agochore: Make code buildable with tl-expected 1.2.0
Joel Rosdahl [Sun, 3 Aug 2025 11:44:15 +0000 (13:44 +0200)] 
chore: Make code buildable with tl-expected 1.2.0

tl-expected 1.2.0 has made tl::expected objects [[nodiscard]], so make
sure to handle all tl::expected return values properly.

2 months agobump: Upgrade to tl-expected 1.2.0
Joel Rosdahl [Fri, 25 Jul 2025 18:48:13 +0000 (20:48 +0200)] 
bump: Upgrade to tl-expected 1.2.0

2 months agoenhance: Add TRY_ASSIGN macro
Joel Rosdahl [Sun, 3 Aug 2025 11:43:51 +0000 (13:43 +0200)] 
enhance: Add TRY_ASSIGN macro

2 months agoenhance: Improve TRY macro
Joel Rosdahl [Sun, 3 Aug 2025 11:43:32 +0000 (13:43 +0200)] 
enhance: Improve TRY macro

2 months agorefactor: Simplify EINTR check for waitpid
Joel Rosdahl [Sun, 3 Aug 2025 06:00:05 +0000 (08:00 +0200)] 
refactor: Simplify EINTR check for waitpid

2 months agofeat: Don't log failure when removing output file in hard link mode
Joel Rosdahl [Sat, 2 Aug 2025 19:09:31 +0000 (21:09 +0200)] 
feat: Don't log failure when removing output file in hard link mode

If there is no preexisting output object file then we shouldn't indicate
an error.

2 months agorefactor: Rename local variable in macro to avoid clashes
Joel Rosdahl [Sat, 2 Aug 2025 16:40:42 +0000 (18:40 +0200)] 
refactor: Rename local variable in macro to avoid clashes

2 months agochore: Remove redundant logging of error
Joel Rosdahl [Sat, 2 Aug 2025 16:40:10 +0000 (18:40 +0200)] 
chore: Remove redundant logging of error

2 months agoci: Avoid using windows-latest runner image
Joel Rosdahl [Sat, 2 Aug 2025 12:16:33 +0000 (14:16 +0200)] 
ci: Avoid using windows-latest runner image

3 months agofix: Expand system-dependent -m{arch,cpu,tune}=native options
Joel Rosdahl [Thu, 24 Jul 2025 13:35:47 +0000 (15:35 +0200)] 
fix: Expand system-dependent -m{arch,cpu,tune}=native options

The -march=native, -mcpu=native and -mtune=native options have different
effects depending on which system the compiler is run.

Fix this by asking the compiler which cc1 options the -m*=native options
expand to and including them in the input hash.

Fixes #824.

3 months agorefactor: Extract command execution code from hashutil to util function
Joel Rosdahl [Thu, 24 Jul 2025 11:18:40 +0000 (13:18 +0200)] 
refactor: Extract command execution code from hashutil to util function

3 months agofeat: Improve logging in execute* functions
Joel Rosdahl [Thu, 24 Jul 2025 10:55:32 +0000 (12:55 +0200)] 
feat: Improve logging in execute* functions

3 months agochore: Simplify Windows-specific hacks for shell scripts in test suite
Joel Rosdahl [Wed, 23 Jul 2025 12:46:39 +0000 (14:46 +0200)] 
chore: Simplify Windows-specific hacks for shell scripts in test suite

3 months agorefactor: Improve variable name in win32execute
Joel Rosdahl [Thu, 24 Jul 2025 08:58:03 +0000 (10:58 +0200)] 
refactor: Improve variable name in win32execute

3 months agochore: Remove dead code in hash_command_output
Joel Rosdahl [Wed, 23 Jul 2025 11:17:02 +0000 (13:17 +0200)] 
chore: Remove dead code in hash_command_output

3 months agorefactor: Move Args to util namespace
Joel Rosdahl [Wed, 23 Jul 2025 08:44:00 +0000 (10:44 +0200)] 
refactor: Move Args to util namespace

3 months agoenhance: Add Args initializer list constructor
Joel Rosdahl [Mon, 21 Jul 2025 19:00:27 +0000 (21:00 +0200)] 
enhance: Add Args initializer list constructor

3 months agochore: Add build-ccache-with-itself script
Joel Rosdahl [Tue, 22 Jul 2025 12:43:25 +0000 (14:43 +0200)] 
chore: Add build-ccache-with-itself script

This script can be used to verify that ccache is able to cache a build
of itself.

Example usage:

    COMMAND=/source/misc/build-ccache-with-itself misc/build-in-docker debian-12

3 months agochore: Finalize renaming of namespaces to lowercase
Joel Rosdahl [Mon, 21 Jul 2025 11:17:26 +0000 (13:17 +0200)] 
chore: Finalize renaming of namespaces to lowercase

3 months agofix: Keep original order of compiler arguments
Joel Rosdahl [Sun, 20 Jul 2025 13:41:44 +0000 (15:41 +0200)] 
fix: Keep original order of compiler arguments

Now when CCACHE_NOCPP2 (run_second_cpp = false) has been removed (see
fd9de83446aeaf1eb1b33a2d900ea1ff757c4509) we can simplify compiler
argument juggling: instead of partitioning arguments into different
lists and reassemble them later, we can build up the preprocessor and
compiler command lines while we go, thus keeping the original order of
arguments.

Fixes #738.

3 months agochore: Remove ability to avoid 2nd call to preprocessor (run_second_cpp)
Joel Rosdahl [Sat, 19 Jul 2025 18:43:32 +0000 (20:43 +0200)] 
chore: Remove ability to avoid 2nd call to preprocessor (run_second_cpp)

ccache before version 1.6 (2002) always sent precompiled source to the
compiler as an optimization to avoid running the preprocessor a second
time. ccache 1.6 (2002) introduced CCACHE_CPP2 to optionally disable
this optimization. This seemed to work well until mid 2010s when
compilers started to behave differently when compiling preprocessed and
non-preprocessed source code. Thus, ccache 3.3 (2016) flipped the
default to make the optimization opt-in via CCACHE_NOCPP2 (or
"run_second_cpp = false").

Fast forward to 2025:

- As far as I can tell, CCACHE_NOCPP2 is used by essentially nobody
  which isn't surprising since it generally doesn't work well.
- The feature comes with increased code complexity. The most painful
  part is that compiler arguments need to be carefully filtered and sent
  to only the preprocessor, only the compiler or both, depending on
  whether run_second_cpp is true or false. And it can be forced to true
  in the middle of argument parsing when an argument that is
  incompatible with "run_second_cpp = false" is found.
- There have been a non-trivial amount of bugs related to CCACHE_NOCPP2
  during the years due to the added complexity and due to new compiler
  behavior that is incompatible with the mode.a
- The depend mode is a more performant alternative to "run_second_cpp =
  false" since ccache 3.6 (2019), though with different tradeoffs.

Thus it's time to make the code less complex and more maintainable:
remove the optimization to send the precompiled source code to the
compiler.

This opens up making argument juggling simpler and fixing bug #738.

3 months agochore: Improve code style
Joel Rosdahl [Sat, 19 Jul 2025 11:08:52 +0000 (13:08 +0200)] 
chore: Improve code style

3 months agochore: Bump to Clang-Format 18
Joel Rosdahl [Sat, 19 Jul 2025 09:06:56 +0000 (11:06 +0200)] 
chore: Bump to Clang-Format 18

3 months agodocs: Mention mitigation for direct mode caveat
Joel Rosdahl [Sat, 19 Jul 2025 10:49:31 +0000 (12:49 +0200)] 
docs: Mention mitigation for direct mode caveat

3 months agofix: Fix bug in support for Clang to compile CUDA code on Windows
senhtry [Thu, 17 Jul 2025 14:01:51 +0000 (22:01 +0800)] 
fix: Fix bug in support for Clang to compile CUDA code on Windows

3 months agochore: Remove ubuntu-20.04 Dockerfile as its CMake is too old
Joel Rosdahl [Thu, 17 Jul 2025 13:47:50 +0000 (15:47 +0200)] 
chore: Remove ubuntu-20.04 Dockerfile as its CMake is too old

3 months agobuild: Drop minimum CMake version to 3.18
Joel Rosdahl [Thu, 17 Jul 2025 13:25:05 +0000 (15:25 +0200)] 
build: Drop minimum CMake version to 3.18

This is to keep supporting Debian 11 for a while longer.

Note that 8648532e3cdcd6a0c4fb12b65e1ca9a8972a1e06 requires CMake > 3.16
(not sure whether 3.17 works), so dropping back to 3.15 is not possible.

Closes #1611.

3 months agofix: Include MSVC variables INCLUDE and EXTERNAL_INCLUDE in input hash
Joel Rosdahl [Tue, 15 Jul 2025 14:48:00 +0000 (16:48 +0200)] 
fix: Include MSVC variables INCLUDE and EXTERNAL_INCLUDE in input hash

See discussion #1606.

3 months agoci: Small GH actions cleanup (#1602)
Maksym Sobolyev [Mon, 14 Jul 2025 18:17:01 +0000 (11:17 -0700)] 
ci: Small GH actions cleanup (#1602)

Remove superfluous ${{ }}.

3 months agoLink libatomic statically when STATIC_LINK is set (#1601)
Maksym Sobolyev [Mon, 14 Jul 2025 18:16:23 +0000 (11:16 -0700)] 
Link libatomic statically when STATIC_LINK is set (#1601)

Link libatomic statically when STATIC_LINK is set.

3 months agobuild: Avoid warning from downloaded zstd's CMake scripts
Joel Rosdahl [Mon, 14 Jul 2025 13:56:24 +0000 (15:56 +0200)] 
build: Avoid warning from downloaded zstd's CMake scripts

3 months agobuild: Use FetchContent_MakeAvailable instead of FetchContent_Populate
Joel Rosdahl [Mon, 14 Jul 2025 13:44:22 +0000 (15:44 +0200)] 
build: Use FetchContent_MakeAvailable instead of FetchContent_Populate

Closes #1501.

3 months agobuild: Require CMake 3.22 or newer
Joel Rosdahl [Mon, 14 Jul 2025 09:12:38 +0000 (11:12 +0200)] 
build: Require CMake 3.22 or newer

For reference, CMake 3.22 is available in Debian 11 as well as Ubuntu
22.04. Distributions based on RHEL 8 have 3.25 or later.

3 months agofeat: Embed manifest to enable long paths on Windows (#1596)
Morten Engelhardt Olsen [Wed, 9 Jul 2025 10:39:58 +0000 (03:39 -0700)] 
feat: Embed manifest to enable long paths on Windows (#1596)

On a windows build, add a ccache.exe manifest which enables long path awareness in Windows 10+.

Fixes #1595.

4 months agotest: Add test for tricky preprocessed cache hit case
Joel Rosdahl [Thu, 26 Jun 2025 19:16:57 +0000 (21:16 +0200)] 
test: Add test for tricky preprocessed cache hit case

See PR #1594.

4 months agofeat: Improve logging for manifest lookup
Joel Rosdahl [Mon, 9 Jun 2025 17:55:23 +0000 (19:55 +0200)] 
feat: Improve logging for manifest lookup

4 months agobuild: Use bundled fmt if DEPS=DOWNLOAD as documented
Joel Rosdahl [Mon, 9 Jun 2025 15:08:25 +0000 (17:08 +0200)] 
build: Use bundled fmt if DEPS=DOWNLOAD as documented

4 months agofeat: Log URLs requested by http backend
Joel Rosdahl [Mon, 9 Jun 2025 15:06:44 +0000 (17:06 +0200)] 
feat: Log URLs requested by http backend

4 months agofix: Detect cc/c++ hard link to clang/clang++ before gcc/g++
Joel Rosdahl [Sat, 7 Jun 2025 19:16:30 +0000 (21:16 +0200)] 
fix: Detect cc/c++ hard link to clang/clang++ before gcc/g++

Apparently clang/clang++ can be gcc/g++ in addition to cc/c++, at least
on some macOS versions, so detect clang hard link before gcc since the
other way around (gcc installed as an alias of clang) seems less likely.

Fixes #1597.

4 months agoci: Remove jobs for soon to be removed windows-2019 runner
Joel Rosdahl [Fri, 30 May 2025 16:33:28 +0000 (18:33 +0200)] 
ci: Remove jobs for soon to be removed windows-2019 runner

4 months agochore: Tweak Clang CUDA code slightly
Joel Rosdahl [Sun, 25 May 2025 17:53:25 +0000 (19:53 +0200)] 
chore: Tweak Clang CUDA code slightly

4 months agochore: Fix source file headers
Joel Rosdahl [Sun, 25 May 2025 17:52:44 +0000 (19:52 +0200)] 
chore: Fix source file headers

4 months agochore: Clean up and modernize dockerfiles
Joel Rosdahl [Sat, 3 May 2025 08:20:30 +0000 (10:20 +0200)] 
chore: Clean up and modernize dockerfiles

4 months agofeat: Support -x cu and -x cuda in Clang CUDA mode (#1593)
R43Qi8krC [Thu, 29 May 2025 09:41:24 +0000 (17:41 +0800)] 
feat: Support -x cu and -x cuda in Clang CUDA mode (#1593)

5 months agoci: Use CodeQL v3 (#1592)
Gregor Jasny [Sun, 25 May 2025 13:35:53 +0000 (15:35 +0200)] 
ci: Use CodeQL v3 (#1592)

This workflow throws an deprecation warning right now:

CodeQL Action major versions v1 and v2 have been deprecated. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2025-01-10-code-scanning-codeql-action-v2-is-now-deprecated/

5 months agofeat: Add support for Clang compiling CUDA code (#1577)
R43Qi8krC [Sun, 25 May 2025 13:33:08 +0000 (21:33 +0800)] 
feat: Add support for Clang compiling CUDA code (#1577)

5 months agochore: Update NEWS
Joel Rosdahl [Sat, 3 May 2025 08:40:16 +0000 (10:40 +0200)] 
chore: Update NEWS

(cherry picked from commit a50f01935030e46fd6f35184ba7b1f11105967b7)

5 months agoci: Disable testing for Windows MSYS2 mingw64 clang
Joel Rosdahl [Thu, 1 May 2025 15:22:15 +0000 (17:22 +0200)] 
ci: Disable testing for Windows MSYS2 mingw64 clang

Clang warns about doctest's include of ciso646:

    In file included from D:/a/ccache/ccache/unittest/main.cpp:26:
    In file included from D:/a/ccache/ccache/build/_deps/doctest-src/doctest/doctest.h:499:
    D:/a/_temp/msys64/mingw64/include/c++/15.1.0/ciso646:46:4: error: "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" [-Werror,-W#warnings]

       46 | #  warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros"

          |    ^

    1 error generated.

See also doctest issue 900.

5 months agobuild: Adapt to doctest 2.4.12
Joel Rosdahl [Mon, 28 Apr 2025 20:01:35 +0000 (22:01 +0200)] 
build: Adapt to doctest 2.4.12

Apparently doctest 2.4.12 has introduced some backward incompatibility
that affects our unit tests, so adapt accordingly.

Fixes #1589.

6 months agofix: Don't swallow -Xpreprocessor -fopenmp
Joel Rosdahl [Wed, 23 Apr 2025 18:20:33 +0000 (20:20 +0200)] 
fix: Don't swallow -Xpreprocessor -fopenmp

This fixes regression in bea737780727e751a8193fc80c83c7c072b8048e

Fixes #1586.

6 months agobump: Upgrade to hiredis 1.3.0
Joel Rosdahl [Wed, 23 Apr 2025 17:23:26 +0000 (19:23 +0200)] 
bump: Upgrade to hiredis 1.3.0

6 months agobump: Upgrade to BLAKE3 1.8.2
Joel Rosdahl [Wed, 23 Apr 2025 17:22:03 +0000 (19:22 +0200)] 
bump: Upgrade to BLAKE3 1.8.2

6 months agochore: Split util::split_once into util::split_once{,_to_views}
Joel Rosdahl [Wed, 23 Apr 2025 17:16:24 +0000 (19:16 +0200)] 
chore: Split util::split_once into util::split_once{,_to_views}

The util::split_once(std::string&&, char) version is a bit overly smart
in that it returns std::string instead of std::string_view for a
temporary std::string input. To reduce the risk for surprises, introduce
a util::split_once_into_views so that input lifetime is indicated in the
method name instead.

6 months agochore: Clean up profiling_gcc_10+ test suite
Joel Rosdahl [Sat, 19 Apr 2025 18:35:04 +0000 (20:35 +0200)] 
chore: Clean up profiling_gcc_10+ test suite

6 months agotest: Silence benign compiler warning in the profiling_gcc_10+ suite
Joel Rosdahl [Sat, 19 Apr 2025 18:34:02 +0000 (20:34 +0200)] 
test: Silence benign compiler warning in the profiling_gcc_10+ suite

6 months agochore: Fix some Clang-Tidy warnings
Joel Rosdahl [Sat, 19 Apr 2025 18:30:01 +0000 (20:30 +0200)] 
chore: Fix some Clang-Tidy warnings