For darwin
hosts we use the env
command to run a compiler in a modified environment which in turn makes ccache
effectively no-op. On master (ae005a647ffa1d457c5c7a0528cb29f3b1937b96):
0$ cat /etc/os-release | grep VERSION=
1VERSION="22.04 (Jammy Jellyfish)"
2$ ccache --version | head -1
3ccache version 4.5.1
4$ make -C depends HOST=x86_64-apple-darwin
5$ ./autogen.sh
6$ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin/share/config.site ./configure
7$ make clean
8$ ccache --zero-stats
9$ make
10$ ccache --show-stats -v
11Summary:
12 Cache directory: /home/hebasto/.cache/ccache
13 Primary config: /home/hebasto/.config/ccache/ccache.conf
14 Secondary config: /etc/ccache.conf
15 Stats updated: Sun Mar 20 12:33:01 2022
16 Hits: 0 / 0
17 Direct: 0 / 0
18 Preprocessed: 0 / 0
19 Misses: 0
20 Direct: 0
21 Preprocessed: 0
22 Uncacheable: 734
23Primary storage:
24 Hits: 0 / 0
25 Misses: 0
26 Cache size (GB): 1.69 / 5.00 (33.87 %)
27 Files: 11790
28Uncacheable:
29 Called for linking: 14
30 Multiple source files: 720
With this PR:
0$ make -C depends HOST=x86_64-apple-darwin
1$ ./autogen.sh
2$ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin/share/config.site ./configure
3$ make clean
4$ make
5$ make clean
6$ ccache --zero-stats
7$ make
8$ ccache --show-stats
9Summary:
10 Hits: 720 / 720 (100.0 %)
11 Direct: 720 / 720 (100.0 %)
12 Preprocessed: 0 / 0
13 Misses: 0
14 Direct: 0
15 Preprocessed: 0
16 Uncacheable: 14
17Primary storage:
18 Hits: 1440 / 1440 (100.0 %)
19 Misses: 0
20 Cache size (GB): 1.74 / 5.00 (34.80 %)
21
22Use the -v/--verbose option for more details.
Fixes bitcoin/bitcoin#21552.
Also this PR improves efficiency of the “macOS 10.15” CI task:
-
master (e09cf64c48286176e7d080edfe901f47baa0a418), https://cirrus-ci.com/task/6266307669655552: