jjb: binutils-gdb: use ccache
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 25 Apr 2023 18:27:45 +0000 (14:27 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Tue, 25 Apr 2023 20:12:03 +0000 (16:12 -0400)
Use ccache to speed up builds when possible.

We have witnessed that the ccache mechanism to regulate the cache size
didn't work under Jenkins for some reason, causing the cache directory
to grow indefinitely.  Run `ccache -c` at the start of each job to force
ccache to do some cleanup and ensure the cache is not over the allowed
size.

Change-Id: I54698ed5ed7b4fd8b416f9864d33d5aae2d67ecd

scripts/binutils-gdb/build.sh

index c8fbc705344e825e47cd68c16fa6908e91e7ce0e..55475308ee664bca5a41695e3342f581ed2f6738 100755 (executable)
@@ -134,6 +134,8 @@ export TMPDIR
 export CFLAGS="-O2 -fsanitize=address"
 export CXXFLAGS="-O2 -fsanitize=address -D_GLIBCXX_DEBUG=1"
 export LDFLAGS="-fsanitize=address"
+export CC="ccache cc"
+export CXX="ccache c++"
 
 # Set platform variables
 case "$platform" in
@@ -148,6 +150,10 @@ esac
 print_os || true
 print_tooling || true
 
+if use_ccache; then
+       ccache -c
+fi
+
 # Enter the source directory
 cd "$SRCDIR"
 
This page took 0.024563 seconds and 4 git commands to generate.