]> git.ipfire.org Git - thirdparty/ccache.git/log
thirdparty/ccache.git
13 months agochore: Update NEWS
Joel Rosdahl [Sun, 30 Jun 2024 17:12:07 +0000 (19:12 +0200)] 
chore: Update NEWS

13 months agochore: Fix reference to format.cc in LICENSE.adoc
Joel Rosdahl [Sun, 30 Jun 2024 18:45:24 +0000 (20:45 +0200)] 
chore: Fix reference to format.cc in LICENSE.adoc

(cherry picked from commit 080d59385332a53ee6407ed666b675022741d46b)

13 months agobuild: Remove no longer needed workaround when building downloaded Zstd
Joel Rosdahl [Mon, 24 Jun 2024 19:01:02 +0000 (21:01 +0200)] 
build: Remove no longer needed workaround when building downloaded Zstd

(cherry picked from commit e0abc817e23c80bceb330936fdc64a583180be84)

13 months agobuild: Bundle Fmt again
Joel Rosdahl [Mon, 24 Jun 2024 18:55:33 +0000 (20:55 +0200)] 
build: Bundle Fmt again

Fmt is currently the only required C++ dependency that isn't bundled.
Since the Fmt API is still evolving, it's convenient for Ccache users
that lack a proper Fmt version locally to be able to build without
having to download Fmt. Thus, bundle Fmt again for now. (When we can
bump compiler requirements to versions that implement std::format
properly in the future we will switch to std::format instead.)

Closes #1470.

(cherry picked from commit 726fc1d27d8e49d64e47a98ae3dac565e1983c4d)

13 months agotest: Improve CCACHE_PREFIX test to catch regression fixed in PR #1474
Joel Rosdahl [Fri, 21 Jun 2024 08:14:15 +0000 (10:14 +0200)] 
test: Improve CCACHE_PREFIX test to catch regression fixed in PR #1474

(cherry picked from commit 89bc5c80e96734f91820462542d7c106f4b18923)

13 months agodocs: Clarify that --set-config writes to the configuration file
Joel Rosdahl [Fri, 14 Jun 2024 18:11:52 +0000 (20:11 +0200)] 
docs: Clarify that --set-config writes to the configuration file

See also discussion #1468.

(cherry picked from commit d220910c1bb52b8f5ea2a8b8ad56f951cf0862c1)

13 months agobuild: Search for libcpp-httplib before libhttplib
Joel Rosdahl [Fri, 14 Jun 2024 18:00:13 +0000 (20:00 +0200)] 
build: Search for libcpp-httplib before libhttplib

The cpp-httplib project has now standardized on libcpp-httplib.so for
the shared library, so search for that name first.

(cherry picked from commit f83aff58bbf9fdf7439ff16f6387f4063cde1487)

13 months agofix: Fix prefix command lookup from PATH (#1474)
Romain Geissler @ Amadeus [Fri, 21 Jun 2024 08:00:15 +0000 (10:00 +0200)] 
fix: Fix prefix command lookup from PATH (#1474)

This fixes regression in 6b85822b50cc509b4d595bf89340bdf0da526dc9.

(cherry picked from commit 8372b56ead496a2f9d152590263bcd7b23013f77)

13 months agobuild: Find CppHttplib named libhttplib.so as well (#1465)
Sam James [Sat, 8 Jun 2024 14:11:48 +0000 (15:11 +0100)] 
build: Find CppHttplib named libhttplib.so as well (#1465)

On Gentoo, the library name is 'httplib', not 'cpp-httplib'. Search
for that first (as it appears to be "more vanilla"), then fall back
to 'cpp-httplib'.

(cherry picked from commit a641e5ea3087752af71e60690dcf3ed3c1dbc56a)

13 months agochore: Fix blake3.h pattern in .clang-format after 2950646b473e
Joel Rosdahl [Fri, 31 May 2024 18:37:12 +0000 (20:37 +0200)] 
chore: Fix blake3.h pattern in .clang-format after 2950646b473e

(cherry picked from commit f887434d35bf6544ce3b56dd7684de804cdaacfa)

13 months agobuild: Fix detection and usage of system blake3 (#1464)
Carlo Cabrera [Fri, 31 May 2024 18:35:16 +0000 (02:35 +0800)] 
build: Fix detection and usage of system blake3 (#1464)

(cherry picked from commit b87dadf4a771e8ab01cb180a42bd39d01608689c)

13 months agochore: Remove Xcode assembly workaround for zstd (#1463)
Gregor Jasny [Fri, 31 May 2024 18:20:03 +0000 (20:20 +0200)] 
chore: Remove Xcode assembly workaround for zstd (#1463)

The fix is included in upstream zstd 1.5.6.

(cherry picked from commit 2950646b473ee1c53aafca4b912ea58967949dc7)

14 months agochore: Update authors v4.10
Joel Rosdahl [Wed, 29 May 2024 19:32:55 +0000 (21:32 +0200)] 
chore: Update authors

14 months agochore: Update NEWS
Joel Rosdahl [Wed, 29 May 2024 19:32:49 +0000 (21:32 +0200)] 
chore: Update NEWS

14 months agoci: Disable Ubuntu 24.04 builds temporarily
Joel Rosdahl [Wed, 29 May 2024 19:16:38 +0000 (21:16 +0200)] 
ci: Disable Ubuntu 24.04 builds temporarily

Logs end like this:

    Running kernel seems to be up-to-date.

    Restarting services...
     systemctl restart chrony.service containerd.service cron.service fwupd.service haveged.service hv-kvp-daemon.service multipathd.service packagekit.service php8.3-fpm.service polkit.service redis-server.service rsyslog.service runner-provisioner.service systemd-journald.service systemd-networkd.service systemd-resolved.service systemd-udevd.service udisks2.service walinuxagent.service
    Error: The operation was canceled.

14 months agobuild: Fix zstd build for older CMake versions
Joel Rosdahl [Wed, 29 May 2024 18:54:31 +0000 (20:54 +0200)] 
build: Fix zstd build for older CMake versions

With CMake 3.17.5 on CentOS7:

    -- Downloading Zstd from the internet since Zstd>=1.3.4 was not found locally and DEPS=AUTO
    CMake Error at cmake/FindZstd.cmake:60 (set_target_properties):
      set_target_properties Can not find target to add properties to:
      libzstd_static
    Call Stack (most recent call first):
      cmake/Dependencies.cmake:29 (find_package)
      CMakeLists.txt:88 (include)

    CMake Error at cmake/FindZstd.cmake:68 (add_library):
      add_library cannot create ALIAS target "dep_zstd" because target
      "libzstd_static" does not already exist.
    Call Stack (most recent call first):
      cmake/Dependencies.cmake:29 (find_package)
      CMakeLists.txt:88 (include)

14 months agochore: Juggle some include headers
Joel Rosdahl [Tue, 28 May 2024 19:47:19 +0000 (21:47 +0200)] 
chore: Juggle some include headers

14 months agobuild: Fix MSVC /Zc:preprocessor warning (#1461)
Silver Zachara [Tue, 28 May 2024 17:03:29 +0000 (19:03 +0200)] 
build: Fix MSVC /Zc:preprocessor warning (#1461)

Don't add the /Zc:preprocessor- compiler flag when it's not needed, to
avoid the following warning:
D9025 : overriding '/Zc:preprocessor' with '/Zc:preprocessor-

The latest Windows SDK v10.0.22621 compiles fine with conforming
preprocessor enabled, the bug was in older SDK-s like <=10.0.20348.0.

Add the /Zc:preprocessor for msvc >=v19.25, it didn't exist before this
version (it existed as /experimental:preprocessor before).

14 months agochore: Remove unused headers (#1460)
Silver Zachara [Tue, 28 May 2024 17:01:29 +0000 (19:01 +0200)] 
chore: Remove unused headers (#1460)

14 months agorefactor: Use tl::expected for process_args return value
Joel Rosdahl [Mon, 27 May 2024 17:55:22 +0000 (19:55 +0200)] 
refactor: Use tl::expected for process_args return value

This should make the error paths more obvious.

As discussed in #1459.

14 months agochore: Fix some Cppcheck warnings
Joel Rosdahl [Sun, 26 May 2024 14:46:12 +0000 (16:46 +0200)] 
chore: Fix some Cppcheck warnings

14 months agochore: Remove obsolete os_path helper in test_storage_local_util
Joel Rosdahl [Sun, 26 May 2024 16:08:39 +0000 (18:08 +0200)] 
chore: Remove obsolete os_path helper in test_storage_local_util

14 months agochore: Improve cast and avoid repeating types (#1459)
Silver Zachara [Mon, 27 May 2024 19:48:05 +0000 (21:48 +0200)] 
chore: Improve cast and avoid repeating types (#1459)

14 months agofeat: Add argument handling for Emscripten's --em-config (#1458)
Byoungchan Lee [Sun, 26 May 2024 09:07:35 +0000 (18:07 +0900)] 
feat: Add argument handling for Emscripten's --em-config (#1458)

14 months agobuild: Fix setting of DEPS=LOCAL if FETCHCONTENT_FULLY_DISCONNECTED=ON
Joel Rosdahl [Tue, 21 May 2024 19:20:50 +0000 (21:20 +0200)] 
build: Fix setting of DEPS=LOCAL if FETCHCONTENT_FULLY_DISCONNECTED=ON

Fixes #1456.

14 months agochore: Fix spelling
Joel Rosdahl [Fri, 17 May 2024 20:21:45 +0000 (22:21 +0200)] 
chore: Fix spelling

14 months agoperf: Use posix_spawn for executing compiler check command (#1451)
Brendan Shanks [Tue, 21 May 2024 16:48:50 +0000 (09:48 -0700)] 
perf: Use posix_spawn for executing compiler check command (#1451)

14 months agorefactor: Simplify code
Joel Rosdahl [Fri, 17 May 2024 19:15:45 +0000 (21:15 +0200)] 
refactor: Simplify code

14 months agoci: Add GCC 14 build
Joel Rosdahl [Fri, 17 May 2024 19:14:16 +0000 (21:14 +0200)] 
ci: Add GCC 14 build

14 months agoci: Use ubuntu-24.04 for GCC 13
Joel Rosdahl [Fri, 17 May 2024 17:26:32 +0000 (19:26 +0200)] 
ci: Use ubuntu-24.04 for GCC 13

Apparently the ubuntu-22.04 image no longer has the g++-13-multilib
package, at least not in GitHub.

14 months agofeat: Add --print-version option (#1454)
Silver Zachara [Fri, 17 May 2024 19:12:25 +0000 (21:12 +0200)] 
feat: Add --print-version option (#1454)

I have added a new `--print-version` option as ccache will support PCH
on msvc and I will need to somehow detect the ccache version to
correctly decide if PCH should be disabled
(`CMAKE_DISABLE_PRECOMPILE_HEADERS`).

So if ccache >=4.10 then don't disable PCH and if it's below then set
`CMAKE_DISABLE_PRECOMPILE_HEADERS=ON`.

14 months agofix: Remove TAKES_ARG for /Fp and /Yu MSVC options (#1453)
Silver Zachara [Fri, 17 May 2024 16:29:40 +0000 (18:29 +0200)] 
fix: Remove TAKES_ARG for /Fp and /Yu MSVC options (#1453)

/Fp and /Yu don't allow space between option and option value.

Fixes #1452

14 months agofix: Handle -Yc without -Fp and -Fo for msvc (#1450)
Silver Zachara [Wed, 15 May 2024 19:05:25 +0000 (21:05 +0200)] 
fix: Handle -Yc without -Fp and -Fo for msvc (#1450)

It allows passing the `-Yc` option without the `-Fp` option and also
without the `-Fo` option.

14 months agofix: Handle -Yc without filepath for msvc (#1448)
Silver Zachara [Wed, 15 May 2024 18:44:21 +0000 (20:44 +0200)] 
fix: Handle -Yc without filepath for msvc (#1448)

This PR further fixes the #1384. Fixes the case when the `/Yc` option is
without the filepath and the `/Fppathname` is also defined.

The `/Yc` can be passed in two ways with and w/o the filepath. When it's
passed w/o the filepath it must take the value of the `/Fp` option and
if the `/Fp` option isn't defined then the resulting .pch file must have
the same base name as the base source file with appended `.pch`
extension (this case isn't handled correctly by ccache).

The `/Yc` option doesn't support passing a filepath with the space
between like `/Yc filepath`. Because of this the `TAKES_ARG` must be
removed. All occurrences of `compopt_takes_path()` can't be invoked for

I have also added a new unittest for this case: "MSVC PCH options with
empty -Yc" and also tested it manually on my example project. Just now,
I have also tested it on a big project with 200 TU with qmake and cmake
build systems with msvc and also clang-cl with msvc compilers with 100%
cache hits (PCH enabled and /Zi replaced with /Z7).

14 months agofeat: Add support for -fdump-ipa-clones (#1449)
Jiri Slaby [Sun, 12 May 2024 07:48:28 +0000 (09:48 +0200)] 
feat: Add support for -fdump-ipa-clones (#1449)

Fixes #1447. Citing:

`-fdump-ipa-clones` is used heavily for live patching. Especially, when
one builds a distro kernel (like SLE 15 SP6), the build uses the option
to generate additional `.000i.ipa-clones` files.

14 months agofix: Force run_second_cpp=true when generating profiling information
Joel Rosdahl [Wed, 8 May 2024 18:45:13 +0000 (20:45 +0200)] 
fix: Force run_second_cpp=true when generating profiling information

If run_second_cpp=false the coverage report will refer to the temporary
preprocessed file instead of the source file. Fix this by forcing
run_second_cpp=true if profiling information is being generated.

Fixes #1441.

15 months agofix: Hash "apparent real path" of object file when using -fprofile-arcs
Joel Rosdahl [Mon, 6 May 2024 18:43:43 +0000 (20:43 +0200)] 
fix: Hash "apparent real path" of object file when using -fprofile-arcs

The object file stores an absolute path based on apparent CWD when
-fprofile-arcs is used, not only the relative object filename.

15 months agotest: Improve verbose printing of test names
Joel Rosdahl [Mon, 6 May 2024 18:41:51 +0000 (20:41 +0200)] 
test: Improve verbose printing of test names

15 months agorefactor: Add more Hash::hash overloads
Joel Rosdahl [Mon, 6 May 2024 18:35:22 +0000 (20:35 +0200)] 
refactor: Add more Hash::hash overloads

15 months agodocs: Improve documentation of gcno_cwd sloppiness
Joel Rosdahl [Sun, 5 May 2024 17:03:47 +0000 (19:03 +0200)] 
docs: Improve documentation of gcno_cwd sloppiness

As suggested by Ben Portner in #1444.

15 months agofix: Handle -fdiagnostics-color for Clang again
Joel Rosdahl [Sun, 5 May 2024 16:56:39 +0000 (18:56 +0200)] 
fix: Handle -fdiagnostics-color for Clang again

Regression in 96ec6c9d98b88f00e1a69bdd0214c237bc7ed04e (ccache 4.6.2).

Fixes #1446.

15 months agochore: Clean up comment and debug log string
Joel Rosdahl [Sat, 4 May 2024 19:03:00 +0000 (21:03 +0200)] 
chore: Clean up comment and debug log string

15 months agotest: Improve printing of test suite
Joel Rosdahl [Thu, 2 May 2024 19:31:24 +0000 (21:31 +0200)] 
test: Improve printing of test suite

15 months agochore: Fix typo
Joel Rosdahl [Wed, 1 May 2024 19:33:36 +0000 (21:33 +0200)] 
chore: Fix typo

15 months agochore: Add Andrew Stubbs to typos ignore list
Joel Rosdahl [Wed, 1 May 2024 08:36:13 +0000 (10:36 +0200)] 
chore: Add Andrew Stubbs to typos ignore list

15 months agochore: Remove unnecessary depend_extra_args
Joel Rosdahl [Sun, 28 Apr 2024 19:50:58 +0000 (21:50 +0200)] 
chore: Remove unnecessary depend_extra_args

The ordinary compiler_args list can be used for executing the compiler
in the depend mode since dependency arguments are present there after
07b55f13e119a2a35d166a73929643911ea69d52.

15 months agotest: Improve verbose printing of test names
Joel Rosdahl [Sat, 27 Apr 2024 16:20:15 +0000 (18:20 +0200)] 
test: Improve verbose printing of test names

15 months agofeat: Support -Xpreprocessor -fopenmp in direct mode
Joel Rosdahl [Sat, 27 Apr 2024 13:22:40 +0000 (15:22 +0200)] 
feat: Support -Xpreprocessor -fopenmp in direct mode

All uses of -Xpreprocessor disable the direct mode as a safety measure
since the command line could include things like

  -Xpreprocessor -MF -Xpreprocessor file.d

which ccache needs to understand as

  -MF file.d

Ideally, ccache should handle this in a generic way. Meanwhile, let's
allow it in the a special case of "-Xpreprocessor -fopenmp" since that's
required on macOS to enable OpenMP.

Closes #1434.

15 months agorefactor: fs::path-ify some functions
Joel Rosdahl [Sun, 14 Apr 2024 08:03:24 +0000 (10:03 +0200)] 
refactor: fs::path-ify some functions

Fixes #1417.

15 months agobump: Update to nonstd-span 0.11.0
Joel Rosdahl [Sat, 27 Apr 2024 08:56:59 +0000 (10:56 +0200)] 
bump: Update to nonstd-span 0.11.0

15 months agobump: Update to zstd 1.5.6
Joel Rosdahl [Sat, 27 Apr 2024 08:55:54 +0000 (10:55 +0200)] 
bump: Update to zstd 1.5.6

15 months agorefactor: Improve util::copy_file implementation
Joel Rosdahl [Fri, 26 Apr 2024 16:44:53 +0000 (18:44 +0200)] 
refactor: Improve util::copy_file implementation

- Merge macOS and POSIX implementations into one.
- Improve error messages.
- Improve variable names.

15 months agorefactor: Improve dependency file parsing
Joel Rosdahl [Thu, 25 Apr 2024 19:32:16 +0000 (21:32 +0200)] 
refactor: Improve dependency file parsing

- Use Depfile::tokenize to parse the dep file in rewrite_source_paths
  instead of an even more ad-hoc parser.
- Add Depfile::untokenize to go from tokens back to text representation.

15 months agoci: Improve MSYS2 job names
Joel Rosdahl [Fri, 19 Apr 2024 18:07:18 +0000 (20:07 +0200)] 
ci: Improve MSYS2 job names

15 months agobuild: Improve handling of dependencies (#1429)
Joel Rosdahl [Sat, 27 Apr 2024 08:30:18 +0000 (10:30 +0200)] 
build: Improve handling of dependencies (#1429)

- Introduced a new CMake variable called `DEPS` with the following
semantics:
- `AUTO` (the default): Use dependencies from the local system if
available. Otherwise: Use bundled dependencies if available. Otherwise:
Download dependencies from the internet (dependencies will then be
linked statically).
- `DOWNLOAD`: Use bundled dependencies if available. Otherwise: Download
recommended versions from the internet (dependencies will then be linked
statically).
- `LOCAL`: Use dependencies from the local system if available.
Otherwise: Use bundled dependencies if available.

The old `HIREDIS_FROM_INTERNET`, `ZSTD_FROM_INTERNET` and `OFFLINE`
variables have been removed in favor of `DEPS`.
- Streamlined the CMake code for hiredis and zstd.
- Removed bundled `getopt_long` implementation.

It seems likely that getopt_long is available on all platforms where
ccache is built nowadays, except Windows. Therefore, remove the bundled
getopt_long implementation for now.

If it turns out that somebody wants to compile ccache on a system that
lacks getopt_long we can add support specifying a system or downloaded
version.
- Implemented our own AVX2 runtime detection instead of using a blake3's
ditto. This opens up for using blake3 from the system.
- Added support for using blake3, httplib, nonstd/span and tl/expected
from the system instead of bundled versions.
- Removed bundled doctest, fmt and xxhash dependencies. Instead,
download them if missing.

Closes #1396.
Closes #1424.

15 months agobuild: Add support for using system blake3 1429/head
Joel Rosdahl [Sat, 30 Mar 2024 19:45:30 +0000 (20:45 +0100)] 
build: Add support for using system blake3

15 months agorefactor: Implement AVX2 runtime detection instead of using blake3's
Joel Rosdahl [Sat, 30 Mar 2024 09:02:27 +0000 (10:02 +0100)] 
refactor: Implement AVX2 runtime detection instead of using blake3's

15 months agobuild: Avoid bundling xxhash
Joel Rosdahl [Wed, 27 Mar 2024 19:33:07 +0000 (20:33 +0100)] 
build: Avoid bundling xxhash

Download xxhash if missing locally instead of using a bundled version.

15 months agobuild: Extract win32-compatibility stuff to a separate library
Joel Rosdahl [Wed, 27 Mar 2024 20:00:06 +0000 (21:00 +0100)] 
build: Extract win32-compatibility stuff to a separate library

15 months agobuild: Let blake3 be a separate target not depended on by third_party
Joel Rosdahl [Wed, 27 Mar 2024 19:02:50 +0000 (20:02 +0100)] 
build: Let blake3 be a separate target not depended on by third_party

15 months agobuild: Improve build of bundled cxxurl third party dependency
Joel Rosdahl [Sun, 24 Mar 2024 10:00:10 +0000 (11:00 +0100)] 
build: Improve build of bundled cxxurl third party dependency

15 months agobuild: Add support for using system tl-expected
Joel Rosdahl [Sat, 23 Mar 2024 20:00:03 +0000 (21:00 +0100)] 
build: Add support for using system tl-expected

15 months agobuild: Add support for using system nonstd-span
Joel Rosdahl [Fri, 22 Mar 2024 20:40:58 +0000 (21:40 +0100)] 
build: Add support for using system nonstd-span

15 months agobuild: Add support for using system cpp-httplib
Joel Rosdahl [Wed, 20 Mar 2024 20:45:10 +0000 (21:45 +0100)] 
build: Add support for using system cpp-httplib

15 months agobuild: Remove bundled getopt_long implementation
Joel Rosdahl [Sun, 17 Mar 2024 08:52:50 +0000 (09:52 +0100)] 
build: Remove bundled getopt_long implementation

It seems likely that getopt_long is available on all platforms where
ccache is built nowadays, except Windows. Therefore, remove the bundled
getopt_long implementation for now.

If it turns out that somebody wants to compile ccache on a system that
lacks getopt_long we can add support specifying a system or downloaded
version.

15 months agobuild: Avoid bundling fmt
Joel Rosdahl [Sun, 17 Mar 2024 08:32:59 +0000 (09:32 +0100)] 
build: Avoid bundling fmt

Download fmt if missing locally instead of using a bundled version.

15 months agobuild: Avoid bundling doctest
Joel Rosdahl [Mon, 11 Mar 2024 19:25:03 +0000 (20:25 +0100)] 
build: Avoid bundling doctest

Download doctest if missing locally instead of using a bundled version.

15 months agobuild: Add add_header_only_library function
Joel Rosdahl [Mon, 18 Mar 2024 19:54:28 +0000 (20:54 +0100)] 
build: Add add_header_only_library function

15 months agobuild: Improve handling of hiredis and zstd dependencies
Joel Rosdahl [Sun, 25 Feb 2024 09:35:07 +0000 (10:35 +0100)] 
build: Improve handling of hiredis and zstd dependencies

Introduced a new CMake variable called DEPS with the following
semantics:

- AUTO (the default): Use dependencies from the local system if
  available. Otherwise: Use bundled dependencies if available.
  Otherwise: Download dependencies from the internet (dependencies will
  then be linked statically).
- DOWNLOAD: Use bundled dependencies if available. Otherwise: Download
  recommended versions from the internet (dependencies will then be
  linked statically).
- LOCAL: Use dependencies from the local system if available. Otherwise:
  Use bundled dependencies if available.

The old {HIREDIS,ZSTD}_FROM_INTERNET and OFFLINE variables have been
removed in favor of DEPS.

Also streamlined the CMake code for hiredis and zstd.

15 months agoperf: Use native file copy on Windows (#1431)
Raihaan Shouhell [Fri, 26 Apr 2024 16:41:08 +0000 (00:41 +0800)] 
perf: Use native file copy on Windows (#1431)

Copyfile improvement for windows.

15 months agoci: Add Windows arm64 build (#1433)
Raihaan Shouhell [Mon, 22 Apr 2024 19:28:46 +0000 (03:28 +0800)] 
ci: Add Windows arm64 build (#1433)

Basic arm64 build for windows

15 months agoci: Update macOS images used (#1432)
Raihaan Shouhell [Mon, 15 Apr 2024 19:16:49 +0000 (03:16 +0800)] 
ci: Update macOS images used (#1432)

Updates macos images used. macOS-14 is M1 arm64. Macos11 has been
deprecated and will be removed in june

15 months agoperf: Use copyfile(3) on apple systems (#1430)
Raihaan Shouhell [Sun, 14 Apr 2024 07:48:44 +0000 (15:48 +0800)] 
perf: Use copyfile(3) on apple systems (#1430)

Use copyfile for more efficient copying on OSX.

15 months agofeat: Add sloppiness for .incbin handling (#1423)
Raihaan Shouhell [Sun, 14 Apr 2024 07:44:40 +0000 (15:44 +0800)] 
feat: Add sloppiness for .incbin handling (#1423)

Code to address some issues in #1421.

15 months agoperf: Use sendfile(2) for file copying (#1427)
Raihaan Shouhell [Sat, 13 Apr 2024 18:33:31 +0000 (02:33 +0800)] 
perf: Use sendfile(2) for file copying (#1427)

Use sendfile for file copying as it avoids copying the data to
user-space and back to kernel space.

15 months agobump: Upgrade to blake3 1.5.1 (#1428)
Raihaan Shouhell [Sat, 13 Apr 2024 18:14:46 +0000 (02:14 +0800)] 
bump: Upgrade to blake3 1.5.1 (#1428)

Update our dependencies

15 months agoci: Disable building test on macOS binaries (#1426)
Raihaan Shouhell [Sat, 13 Apr 2024 14:42:33 +0000 (22:42 +0800)] 
ci: Disable building test on macOS binaries (#1426)

We don't run the tests when building macOS universal binaries as it's
covered elsewhere so we can save some compile time by removing test
builds.

15 months agochore: Fix path to build-in-docker
Joel Rosdahl [Wed, 10 Apr 2024 16:30:16 +0000 (18:30 +0200)] 
chore: Fix path to build-in-docker

15 months agofeat: Clear manifest on recache
Joel Rosdahl [Tue, 9 Apr 2024 17:47:44 +0000 (19:47 +0200)] 
feat: Clear manifest on recache

If there are bad entries in the manifest it doesn't help to run with
recache if the new entry (resulting from the recached compilation)
already exists as an older entry in the manifest.

Improve this by not populating the manifest in recache mode.

16 months agochore: Suppress false positive typos
Joel Rosdahl [Sat, 6 Apr 2024 08:09:13 +0000 (10:09 +0200)] 
chore: Suppress false positive typos

16 months agochore: Sort list
Joel Rosdahl [Sat, 6 Apr 2024 08:08:51 +0000 (10:08 +0200)] 
chore: Sort list

16 months agotest: Don't leave fs_test.tmp* files after InodeCache unit tests
Joel Rosdahl [Mon, 1 Apr 2024 19:24:14 +0000 (21:24 +0200)] 
test: Don't leave fs_test.tmp* files after InodeCache unit tests

16 months agochore: Add fedora-40 dockerfile
Joel Rosdahl [Sat, 30 Mar 2024 19:16:58 +0000 (20:16 +0100)] 
chore: Add fedora-40 dockerfile

16 months agochore: Fix typo in LICENSE.adoc
Joel Rosdahl [Wed, 27 Mar 2024 20:06:48 +0000 (21:06 +0100)] 
chore: Fix typo in LICENSE.adoc

16 months agobuild: Move add_compile_flag_if_supported to Utils.cmake
Joel Rosdahl [Sun, 17 Mar 2024 18:13:27 +0000 (19:13 +0100)] 
build: Move add_compile_flag_if_supported to Utils.cmake

16 months agoci: Sort package list
Joel Rosdahl [Sun, 17 Mar 2024 15:01:39 +0000 (16:01 +0100)] 
ci: Sort package list

16 months agochore: Remove redundant copy of DEF_WRAP_1_R
Joel Rosdahl [Sun, 17 Mar 2024 20:38:34 +0000 (21:38 +0100)] 
chore: Remove redundant copy of DEF_WRAP_1_R

16 months agochore: Remove unsupported ubuntu-18.04 build from misc/test-all-systems
Joel Rosdahl [Sun, 17 Mar 2024 14:57:02 +0000 (15:57 +0100)] 
chore: Remove unsupported ubuntu-18.04 build from misc/test-all-systems

16 months agochore: Make it possible to run misc/build-in-docker from any directory
Joel Rosdahl [Sun, 17 Mar 2024 14:56:47 +0000 (15:56 +0100)] 
chore: Make it possible to run misc/build-in-docker from any directory

16 months agochore: Fix build parallelism in ci/build again
Joel Rosdahl [Sun, 17 Mar 2024 14:55:19 +0000 (15:55 +0100)] 
chore: Fix build parallelism in ci/build again

The -j option was removed in 39dcc7488159e6812292ecbd15a1ed25ade493a2,
but that means that builds using make will be serial. Thus add the
option again.

16 months agochore: Start docker containers with --init
Joel Rosdahl [Sun, 17 Mar 2024 14:37:11 +0000 (15:37 +0100)] 
chore: Start docker containers with --init

16 months agochore: Fix grammar
Joel Rosdahl [Sun, 17 Mar 2024 09:53:21 +0000 (10:53 +0100)] 
chore: Fix grammar

16 months agorefactor: Use {read,write}_file for MSYS2 code paths in LockFile
Joel Rosdahl [Sat, 23 Mar 2024 15:39:07 +0000 (16:39 +0100)] 
refactor: Use {read,write}_file for MSYS2 code paths in LockFile

16 months agoenhance: Implement O_EXCL mode for util::write_file
Joel Rosdahl [Sat, 23 Mar 2024 15:29:59 +0000 (16:29 +0100)] 
enhance: Implement O_EXCL mode for util::write_file

16 months agorefactor: Let util::read_file stat fd on POSIX as well
Joel Rosdahl [Sat, 23 Mar 2024 15:03:34 +0000 (16:03 +0100)] 
refactor: Let util::read_file stat fd on POSIX as well

16 months agoenhance: Teach DirEntry how to stat a file descriptor
Joel Rosdahl [Sat, 23 Mar 2024 15:02:13 +0000 (16:02 +0100)] 
enhance: Teach DirEntry how to stat a file descriptor

16 months agofix: Adapt util::LockFile to MSYS2 (#1416)
Kreijstal [Sat, 23 Mar 2024 15:07:49 +0000 (16:07 +0100)] 
fix: Adapt util::LockFile to MSYS2 (#1416)

MSYS2 will not let you create a symlink to a nonexistent file, only to
an already existing file. To overcome this issue we use files, and write
content on it.

For Cygwin/MSYS2, the patch leverages POSIX `open` with the flags
`O_WRONLY | O_CREAT | O_EXCL`, effectively creating an exclusive lock
file. As suggested by @jrosdahl , thank you so much for the suggestion.
This still does not pass the test suite, but makes ccache usable.

16 months agoperf: Optimize file reading on Windows (#1418)
Joel Rosdahl [Sat, 23 Mar 2024 11:54:45 +0000 (12:54 +0100)] 
perf: Optimize file reading on Windows (#1418)

Reading the file in do_hash_file as Bytes skips CRLF to LF conversion
and is therefore way faster.

Optimize read_file size_hint on Windows by getting the file size of the
existing handle instead of opening a duplicate one.

16 months agoOptimize read_file size_hint on Windows 1418/head
Clemens Wasser [Wed, 20 Mar 2024 12:40:58 +0000 (13:40 +0100)] 
Optimize read_file size_hint on Windows

16 months agoRead file in do_hash_file as Bytes
Clemens Wasser [Wed, 20 Mar 2024 12:40:31 +0000 (13:40 +0100)] 
Read file in do_hash_file as Bytes